Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/Ringtoets.ClosingStructures.Data.TestUtil.Test.csproj
===================================================================
diff -u -rf9e4f420b403e6417f5dc2ba6d7beab9424baf89 -rc9130fbb8186c9b1c3d4c4b8496fd4035b80f825
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/Ringtoets.ClosingStructures.Data.TestUtil.Test.csproj (.../Ringtoets.ClosingStructures.Data.TestUtil.Test.csproj) (revision f9e4f420b403e6417f5dc2ba6d7beab9424baf89)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/Ringtoets.ClosingStructures.Data.TestUtil.Test.csproj (.../Ringtoets.ClosingStructures.Data.TestUtil.Test.csproj) (revision c9130fbb8186c9b1c3d4c4b8496fd4035b80f825)
@@ -49,6 +49,7 @@
Properties\GlobalAssembly.cs
+
@@ -66,6 +67,14 @@
{d4200f43-3f72-4f42-af0a-8ced416a38ec}Ringtoets.Common.Data
+
+ {4843D6E5-066F-4795-94F5-1D53932DD03C}
+ Ringtoets.Common.Data.TestUtil
+
+
+ {70f8cc9c-5bc8-4fb2-b201-eae7fa8088c2}
+ Ringtoets.HydraRing.Data
+ {c6309704-d67b-434c-bc98-9f8910bc1d10}Ringtoets.ClosingStructures.Data
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/TestClosingStructureCalculationTest.cs
===================================================================
diff -u
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/TestClosingStructureCalculationTest.cs (revision 0)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/TestClosingStructureCalculationTest.cs (revision c9130fbb8186c9b1c3d4c4b8496fd4035b80f825)
@@ -0,0 +1,66 @@
+// 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 NUnit.Framework;
+using Ringtoets.Common.Data.TestUtil;
+
+namespace Ringtoets.ClosingStructures.Data.TestUtil.Test
+{
+ [TestFixture]
+ public class TestClosingStructureCalculationTest
+ {
+ [Test]
+ public void Constructor_DefaultPropertyValuesAreSet()
+ {
+ // Setup
+ var referenceStructure = new TestClosingStructure();
+
+ // Call
+ var calculation = new TestClosingStructureCalculation();
+
+ // Assert
+ Assert.IsInstanceOf(calculation);
+ Assert.AreEqual("Nieuwe berekening", calculation.Name);
+ Assert.IsNotNull(calculation.InputParameters);
+ Assert.IsNull(calculation.Comments);
+ Assert.IsFalse(calculation.HasOutput);
+
+ Assert.IsNotNull(calculation.InputParameters.Structure);
+ Assert.IsNotNull(calculation.InputParameters.HydraulicBoundaryLocation);
+
+ DistributionAssert.AreEqual(referenceStructure.StorageStructureArea, calculation.InputParameters.StorageStructureArea);
+ DistributionAssert.AreEqual(referenceStructure.AllowedLevelIncreaseStorage, calculation.InputParameters.AllowedLevelIncreaseStorage);
+ Assert.AreEqual(referenceStructure.StructureNormalOrientation, calculation.InputParameters.StructureNormalOrientation);
+ DistributionAssert.AreEqual(referenceStructure.WidthFlowApertures, calculation.InputParameters.WidthFlowApertures);
+ DistributionAssert.AreEqual(referenceStructure.LevelCrestStructureNotClosing, calculation.InputParameters.LevelCrestStructureNotClosing);
+ DistributionAssert.AreEqual(referenceStructure.InsideWaterLevel, calculation.InputParameters.InsideWaterLevel);
+ DistributionAssert.AreEqual(referenceStructure.ThresholdHeightOpenWeir, calculation.InputParameters.ThresholdHeightOpenWeir);
+ DistributionAssert.AreEqual(referenceStructure.AreaFlowApertures, calculation.InputParameters.AreaFlowApertures);
+ DistributionAssert.AreEqual(referenceStructure.CriticalOvertoppingDischarge, calculation.InputParameters.CriticalOvertoppingDischarge);
+ DistributionAssert.AreEqual(referenceStructure.FlowWidthAtBottomProtection, calculation.InputParameters.FlowWidthAtBottomProtection);
+ Assert.AreEqual(referenceStructure.ProbabilityOpenStructureBeforeFlooding, calculation.InputParameters.ProbabilityOpenStructureBeforeFlooding);
+ Assert.AreEqual(referenceStructure.FailureProbabilityOpenStructure, calculation.InputParameters.FailureProbabilityOpenStructure);
+ Assert.AreEqual(referenceStructure.IdenticalApertures, calculation.InputParameters.IdenticalApertures);
+ Assert.AreEqual(referenceStructure.FailureProbabilityOpenStructure, calculation.InputParameters.FailureProbabilityOpenStructure);
+ Assert.AreEqual(referenceStructure.InflowModelType, calculation.InputParameters.InflowModelType);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/Ringtoets.ClosingStructures.Data.TestUtil.csproj
===================================================================
diff -u -rf9e4f420b403e6417f5dc2ba6d7beab9424baf89 -rc9130fbb8186c9b1c3d4c4b8496fd4035b80f825
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/Ringtoets.ClosingStructures.Data.TestUtil.csproj (.../Ringtoets.ClosingStructures.Data.TestUtil.csproj) (revision f9e4f420b403e6417f5dc2ba6d7beab9424baf89)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/Ringtoets.ClosingStructures.Data.TestUtil.csproj (.../Ringtoets.ClosingStructures.Data.TestUtil.csproj) (revision c9130fbb8186c9b1c3d4c4b8496fd4035b80f825)
@@ -46,6 +46,7 @@
+
@@ -61,6 +62,10 @@
{d4200f43-3f72-4f42-af0a-8ced416a38ec}Ringtoets.Common.Data
+
+ {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2}
+ Ringtoets.HydraRing.Data
+ {c6309704-d67b-434c-bc98-9f8910bc1d10}Ringtoets.ClosingStructures.Data
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/TestClosingStructureCalculation.cs
===================================================================
diff -u
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/TestClosingStructureCalculation.cs (revision 0)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/TestClosingStructureCalculation.cs (revision c9130fbb8186c9b1c3d4c4b8496fd4035b80f825)
@@ -0,0 +1,34 @@
+// 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 Ringtoets.HydraRing.Data;
+
+namespace Ringtoets.ClosingStructures.Data.TestUtil
+{
+ public class TestClosingStructureCalculation : ClosingStructuresCalculation
+ {
+ public TestClosingStructureCalculation()
+ {
+ InputParameters.Structure = new TestClosingStructure();
+ InputParameters.HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "location", 1, 1);
+ }
+ }
+}
Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Calculator/Factory/HydraRingCalculatorFactory.cs
===================================================================
diff -u -r9b92b0800fb589b1964b6e97e2d82a1765d3e6ad -rc9130fbb8186c9b1c3d4c4b8496fd4035b80f825
--- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Calculator/Factory/HydraRingCalculatorFactory.cs (.../HydraRingCalculatorFactory.cs) (revision 9b92b0800fb589b1964b6e97e2d82a1765d3e6ad)
+++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Calculator/Factory/HydraRingCalculatorFactory.cs (.../HydraRingCalculatorFactory.cs) (revision c9130fbb8186c9b1c3d4c4b8496fd4035b80f825)
@@ -73,5 +73,10 @@
{
return new StructuresOvertoppingCalculator(hlcdDirectory, ringId);
}
+
+ public IStructuresClosureCalculator CreateStructuresClosureCalculator(string hlcdDirectory, string ringId)
+ {
+ return new StructuresClosureCalculator(hlcdDirectory, ringId);
+ }
}
}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil/Calculator/TestHydraRingCalculatorFactory.cs
===================================================================
diff -u -ra5f2f2b83d30f57bbeacdc77a431b67c28a1ebde -rc9130fbb8186c9b1c3d4c4b8496fd4035b80f825
--- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil/Calculator/TestHydraRingCalculatorFactory.cs (.../TestHydraRingCalculatorFactory.cs) (revision a5f2f2b83d30f57bbeacdc77a431b67c28a1ebde)
+++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.TestUtil/Calculator/TestHydraRingCalculatorFactory.cs (.../TestHydraRingCalculatorFactory.cs) (revision c9130fbb8186c9b1c3d4c4b8496fd4035b80f825)
@@ -125,6 +125,12 @@
public string OutputFileContent { get; set; }
}
+ public class TestStructuresClosureCalculator : TestHydraRingCalculator, IStructuresClosureCalculator
+ {
+ public double ExceedanceProbabilityBeta { get; set; }
+ public string OutputFileContent { get; set; }
+ }
+
public class TestHydraRingCalculator
{
public readonly List ReceivedInputs = new List();