Index: Ringtoets.sln
===================================================================
diff -u -rcddd4b610dd6850402f357170cee5b8a0204df49 -r8c7c25ff896b8967361c5c8f4e6ef261ff6f5164
--- Ringtoets.sln (.../Ringtoets.sln) (revision cddd4b610dd6850402f357170cee5b8a0204df49)
+++ Ringtoets.sln (.../Ringtoets.sln) (revision 8c7c25ff896b8967361c5c8f4e6ef261ff6f5164)
@@ -1155,6 +1155,11 @@
{C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.ClosingStructures.Integration.Test", "Ringtoets\ClosingStructures\test\Ringtoets.ClosingStructures.Integration.Test\Ringtoets.ClosingStructures.Integration.Test.csproj", "{CD7F7458-A273-4855-9744-4CCAFE0499D0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
CreateInstaller|x86 = CreateInstaller|x86
@@ -1530,6 +1535,7 @@
{26214BD0-DAFB-4CFC-8EB2-80C5D53C859E}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86
{26214BD0-DAFB-4CFC-8EB2-80C5D53C859E}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86
{A8CE1456-1880-4FC8-84B3-D618EA88F384}.CreateInstaller|x86.ActiveCfg = Release|x86
+ {A8CE1456-1880-4FC8-84B3-D618EA88F384}.CreateInstaller|x86.Build.0 = Release|x86
{A8CE1456-1880-4FC8-84B3-D618EA88F384}.CreateInstallerWithDemoProject|x86.ActiveCfg = Release|x86
{A8CE1456-1880-4FC8-84B3-D618EA88F384}.Debug|x86.ActiveCfg = Debug|x86
{A8CE1456-1880-4FC8-84B3-D618EA88F384}.Debug|x86.Build.0 = Debug|x86
@@ -2898,6 +2904,16 @@
{1F4D7974-2E42-4EA4-BDF7-C7BAFF2FE57C}.Release|x86.Build.0 = Release|x86
{1F4D7974-2E42-4EA4-BDF7-C7BAFF2FE57C}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86
{1F4D7974-2E42-4EA4-BDF7-C7BAFF2FE57C}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86
+ {CD7F7458-A273-4855-9744-4CCAFE0499D0}.CreateInstaller|x86.ActiveCfg = ReleaseForCodeCoverage|x86
+ {CD7F7458-A273-4855-9744-4CCAFE0499D0}.CreateInstaller|x86.Build.0 = ReleaseForCodeCoverage|x86
+ {CD7F7458-A273-4855-9744-4CCAFE0499D0}.CreateInstallerWithDemoProject|x86.ActiveCfg = ReleaseForCodeCoverage|x86
+ {CD7F7458-A273-4855-9744-4CCAFE0499D0}.CreateInstallerWithDemoProject|x86.Build.0 = ReleaseForCodeCoverage|x86
+ {CD7F7458-A273-4855-9744-4CCAFE0499D0}.Debug|x86.ActiveCfg = Debug|x86
+ {CD7F7458-A273-4855-9744-4CCAFE0499D0}.Debug|x86.Build.0 = Debug|x86
+ {CD7F7458-A273-4855-9744-4CCAFE0499D0}.Release|x86.ActiveCfg = Release|x86
+ {CD7F7458-A273-4855-9744-4CCAFE0499D0}.Release|x86.Build.0 = Release|x86
+ {CD7F7458-A273-4855-9744-4CCAFE0499D0}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86
+ {CD7F7458-A273-4855-9744-4CCAFE0499D0}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -3136,6 +3152,7 @@
{C10FFCBF-767F-4F3F-B8F9-7D6F4849FF85} = {056EB867-151E-40DE-9808-A6F7F3746C62}
{F5B43C29-6169-4E9A-859E-09090330B94E} = {056EB867-151E-40DE-9808-A6F7F3746C62}
{13C8D0A6-13A2-4C81-9507-27AFD847C7AA} = {056EB867-151E-40DE-9808-A6F7F3746C62}
+ {CD7F7458-A273-4855-9744-4CCAFE0499D0} = {056EB867-151E-40DE-9808-A6F7F3746C62}
{EDE2D56C-504D-45BA-B55C-99C791204E05} = {C4444148-F4A6-4CA5-803C-B725142DC766}
{91119B0B-C26B-4ADF-BE4A-B4228331786E} = {C4444148-F4A6-4CA5-803C-B725142DC766}
{3D4B9740-8348-4434-8D77-B611FC6EE57F} = {EDE2D56C-504D-45BA-B55C-99C791204E05}
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivity.cs
===================================================================
diff -u
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivity.cs (revision 0)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationActivity.cs (revision 8c7c25ff896b8967361c5c8f4e6ef261ff6f5164)
@@ -0,0 +1,84 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Core.Common.Base.Service;
+using Ringtoets.ClosingStructures.Data;
+using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.HydraRing.Calculation.Activities;
+
+namespace Ringtoets.ClosingStructures.Service
+{
+ ///
+ /// for running a structures closure calculation.
+ ///
+ public class ClosingStructuresCalculationActivity : HydraRingActivityBase
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The height structures data used for the calculation.
+ /// The directory of the HLCD file that should be used for performing the calculation.
+ /// The failure mechanism the calculation belongs to.
+ /// The assessment section the calculation belongs to.
+ /// Thrown when any input argument is null.
+ public ClosingStructuresCalculationActivity(ClosingStructuresCalculation calculation, string hlcdDirectory,
+ ClosingStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection)
+ {
+ if (calculation == null)
+ {
+ throw new ArgumentNullException("calculation");
+ }
+
+ if (hlcdDirectory == null)
+ {
+ throw new ArgumentNullException("hlcdDirectory");
+ }
+
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException("failureMechanism");
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException("assessmentSection");
+ }
+
+ Name = calculation.Name;
+ }
+
+ protected override void PerformCalculation()
+ {
+ throw new NotImplementedException();
+ }
+
+ protected override void OnCancel()
+ {
+ throw new NotImplementedException();
+ }
+
+ protected override void OnFinish()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/Ringtoets.ClosingStructures.Service.csproj
===================================================================
diff -u -r5b93e866c25c39a178b2fdd6d10b1baf5a05d070 -r8c7c25ff896b8967361c5c8f4e6ef261ff6f5164
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/Ringtoets.ClosingStructures.Service.csproj (.../Ringtoets.ClosingStructures.Service.csproj) (revision 5b93e866c25c39a178b2fdd6d10b1baf5a05d070)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/Ringtoets.ClosingStructures.Service.csproj (.../Ringtoets.ClosingStructures.Service.csproj) (revision 8c7c25ff896b8967361c5c8f4e6ef261ff6f5164)
@@ -39,13 +39,36 @@
Properties\GlobalAssembly.cs
+
Copying.licenseheader
+
+
+ {3bbfd65b-b277-4e50-ae6d-bd24c3434609}
+ Core.Common.Base
+ False
+
+
+ {d4200f43-3f72-4f42-af0a-8ced416a38ec}
+ Ringtoets.Common.Data
+ False
+
+
+ {888D4097-8BC2-4703-9FB1-8744C94D525E}
+ Ringtoets.HydraRing.Calculation
+ False
+
+
+ {C6309704-D67B-434C-BC98-9F8910BC1D10}
+ Ringtoets.ClosingStructures.Data
+ False
+
+
+
\ No newline at end of file
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationActivityTest.cs
===================================================================
diff -u
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationActivityTest.cs (revision 0)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationActivityTest.cs (revision 8c7c25ff896b8967361c5c8f4e6ef261ff6f5164)
@@ -0,0 +1,130 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Core.Common.Base.Service;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.ClosingStructures.Data;
+using Ringtoets.Common.Data.AssessmentSection;
+
+namespace Ringtoets.ClosingStructures.Service.Test
+{
+ [TestFixture]
+ public class ClosingStructuresCalculationActivityTest
+ {
+ [Test]
+ public void ParameteredConstructor_ExpectedValues()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSectionMock = mocks.StrictMock();
+ mocks.ReplayAll();
+
+ var failureMechanism = new ClosingStructuresFailureMechanism();
+ var calculation = new ClosingStructuresCalculation();
+
+ // Call
+ var activity = new ClosingStructuresCalculationActivity(calculation, "", failureMechanism, assessmentSectionMock);
+
+ // Assert
+ Assert.IsInstanceOf(activity);
+ Assert.AreEqual(calculation.Name, activity.Name);
+ Assert.IsNull(activity.ProgressText);
+ Assert.AreEqual(ActivityState.None, activity.State);
+
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void ParameteredConstructor_CalculationNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSectionMock = mocks.StrictMock();
+ mocks.ReplayAll();
+
+ var failureMechanism = new ClosingStructuresFailureMechanism();
+
+ // Call
+ TestDelegate call = () => new ClosingStructuresCalculationActivity(null, "", failureMechanism, assessmentSectionMock);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("calculation", exception.ParamName);
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void ParameteredConstructor_HlcdDirectoryNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSectionMock = mocks.StrictMock();
+ mocks.ReplayAll();
+
+ var failureMechanism = new ClosingStructuresFailureMechanism();
+ var calculation = new ClosingStructuresCalculation();
+
+ // Call
+ TestDelegate call = () => new ClosingStructuresCalculationActivity(calculation, null, failureMechanism, assessmentSectionMock);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("hlcdDirectory", exception.ParamName);
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void ParameteredConstructor_FailureMechanismNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSectionMock = mocks.StrictMock();
+ mocks.ReplayAll();
+
+ var calculation = new ClosingStructuresCalculation();
+
+ // Call
+ TestDelegate call = () => new ClosingStructuresCalculationActivity(calculation, "", null, assessmentSectionMock);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("failureMechanism", exception.ParamName);
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ public void ParameteredConstructor_AssessmentSectionNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var failureMechanism = new ClosingStructuresFailureMechanism();
+ var calculation = new ClosingStructuresCalculation();
+
+ // Call
+ TestDelegate call = () => new ClosingStructuresCalculationActivity(calculation, "", failureMechanism, null);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("assessmentSection", exception.ParamName);
+ }
+ }
+}
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/Ringtoets.ClosingStructures.Service.Test.csproj
===================================================================
diff -u -r2b2da37541708b8ad95286e731010dd9d27d5070 -r8c7c25ff896b8967361c5c8f4e6ef261ff6f5164
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/Ringtoets.ClosingStructures.Service.Test.csproj (.../Ringtoets.ClosingStructures.Service.Test.csproj) (revision 2b2da37541708b8ad95286e731010dd9d27d5070)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/Ringtoets.ClosingStructures.Service.Test.csproj (.../Ringtoets.ClosingStructures.Service.Test.csproj) (revision 8c7c25ff896b8967361c5c8f4e6ef261ff6f5164)
@@ -37,13 +37,21 @@
none
+
+ ..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
+
+
+ ..\..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll
+ True
+
Properties\GlobalAssembly.cs
+
@@ -52,6 +60,28 @@
+
+
+ {3bbfd65b-b277-4e50-ae6d-bd24c3434609}
+ Core.Common.Base
+
+
+ {D4200F43-3F72-4F42-AF0A-8CED416A38EC}
+ Ringtoets.Common.Data
+
+
+ {888d4097-8bc2-4703-9fb1-8744c94d525e}
+ Ringtoets.HydraRing.Calculation
+
+
+ {C6309704-D67B-434C-BC98-9F8910BC1D10}
+ Ringtoets.ClosingStructures.Data
+
+
+ {2BDF07D4-0E81-4B9E-9618-E7EBD9399912}
+ Ringtoets.ClosingStructures.Service
+
+
+
\ No newline at end of file