Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsCalculation.cs =================================================================== diff -u -rb220dd8e30de95898e4d70e1122736405b19da06 -r873b8bf10a9c767214fa5a3a1e6cf340e060657f --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsCalculation.cs (.../GrassCoverErosionInwardsCalculation.cs) (revision b220dd8e30de95898e4d70e1122736405b19da06) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsCalculation.cs (.../GrassCoverErosionInwardsCalculation.cs) (revision 873b8bf10a9c767214fa5a3a1e6cf340e060657f) @@ -114,7 +114,7 @@ InputParameters.UseBreakWater = true; // Orientation - InputParameters.Orientation = new RoundedDouble(InputParameters.Orientation.NumberOfDecimalPlaces, 5.5); + InputParameters.Orientation = (RoundedDouble) 5.5; // Dike and Foreshore var dikeSections = new[] @@ -130,7 +130,7 @@ InputParameters.UseForeshore = true; // Dike height - InputParameters.DikeHeight = new RoundedDouble(InputParameters.DikeHeight.NumberOfDecimalPlaces, 10); + InputParameters.DikeHeight = (RoundedDouble) 10; } } } \ No newline at end of file Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs =================================================================== diff -u -r7ddd944b70d252ae493bba48ea9b31c01634082d -r873b8bf10a9c767214fa5a3a1e6cf340e060657f --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs (.../HeightStructuresCalculation.cs) (revision 7ddd944b70d252ae493bba48ea9b31c01634082d) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs (.../HeightStructuresCalculation.cs) (revision 873b8bf10a9c767214fa5a3a1e6cf340e060657f) @@ -21,6 +21,7 @@ using System; using Core.Common.Base; +using Core.Common.Base.Data; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probability; using Ringtoets.HeightStructures.Data.Properties; @@ -51,6 +52,7 @@ InputParameters = new HeightStructuresInput(generalInputParameters); NormProbabilityInput = normProbabilityInput; Name = Resources.HeightStructuresCalculation_DefaultName; + AddDemoInput(); } /// @@ -96,5 +98,18 @@ { return Output; } + + private void AddDemoInput() + { + InputParameters.LevelOfCrestOfStructure.Mean = (RoundedDouble) 3.5; + InputParameters.OrientationOfTheNormalOfTheStructure = (RoundedDouble) 115; + InputParameters.AllowableIncreaseOfLevelForStorage.Mean = (RoundedDouble) 1.0; + InputParameters.StorageStructureArea.Mean = (RoundedDouble) 1000000; + InputParameters.FlowWidthAtBottomProtection.Mean = (RoundedDouble) 18; + InputParameters.CriticalOvertoppingDischarge.Mean = (RoundedDouble) 1; + InputParameters.WidthOfFlowApertures.Mean = (RoundedDouble) 18; + InputParameters.DeviationOfTheWaveDirection = (RoundedDouble) 0; + InputParameters.FailureProbabilityOfStructureGivenErosion = (RoundedDouble) 1; + } } } \ No newline at end of file Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs =================================================================== diff -u -r2dc3f17db9958ee4146f90efd7d38eb335ef822f -r873b8bf10a9c767214fa5a3a1e6cf340e060657f --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs (.../HeightStructuresInput.cs) (revision 2dc3f17db9958ee4146f90efd7d38eb335ef822f) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs (.../HeightStructuresInput.cs) (revision 873b8bf10a9c767214fa5a3a1e6cf340e060657f) @@ -61,10 +61,11 @@ levelOfCrestOfStructure = new NormalDistribution(2) { + Mean = new RoundedDouble(2), StandardDeviation = new RoundedDouble(2, 0.05) }; - OrientationOfTheNormalOfTheStructure = new RoundedDouble(2); + orientationOfTheNormalOfTheStructure = new RoundedDouble(2); modelFactorOvertoppingSuperCriticalFlow = new NormalDistribution(2) { @@ -74,34 +75,42 @@ allowableIncreaseOfLevelForStorage = new LognormalDistribution(2) { + Mean = new RoundedDouble(2, double.NaN), StandardDeviation = new RoundedDouble(2, 0.1) }; storageStructureArea = new LognormalDistribution(2) { + Mean = new RoundedDouble(2, double.NaN), StandardDeviation = new RoundedDouble(2, 0.1) }; flowWidthAtBottomProtection = new LognormalDistribution(2) { + Mean = new RoundedDouble(2, double.NaN), StandardDeviation = new RoundedDouble(2, 0.05) }; criticalOvertoppingDischarge = new LognormalDistribution(2) { + Mean = new RoundedDouble(2, double.NaN), StandardDeviation = new RoundedDouble(2, 0.15) }; + failureProbabilityOfStructureGivenErosion = new RoundedDouble(2); + widthOfFlowApertures = new NormalDistribution(2) { + Mean = new RoundedDouble(2), StandardDeviation = new RoundedDouble(2, 0.05) }; deviationOfTheWaveDirection = new RoundedDouble(2); stormDuration = new LognormalDistribution(2) { - Mean = new RoundedDouble(2, 7.5), StandardDeviation = new RoundedDouble(2, 0.25) + Mean = new RoundedDouble(2, 7.5), + StandardDeviation = new RoundedDouble(2, 0.25) }; } Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs =================================================================== diff -u -r7ddd944b70d252ae493bba48ea9b31c01634082d -r873b8bf10a9c767214fa5a3a1e6cf340e060657f --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs (.../HeightStructuresCalculationTest.cs) (revision 7ddd944b70d252ae493bba48ea9b31c01634082d) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs (.../HeightStructuresCalculationTest.cs) (revision 873b8bf10a9c767214fa5a3a1e6cf340e060657f) @@ -76,6 +76,7 @@ Assert.AreEqual(normProbabilityInput, calculation.NormProbabilityInput); Assert.IsNull(calculation.Comments); Assert.IsFalse(calculation.HasOutput); + AssertDemoInput(calculation.InputParameters); } [Test] @@ -159,6 +160,28 @@ Assert.AreSame(calculation.Output, output); } + private void AssertDemoInput(HeightStructuresInput inputParameters) + { + Assert.AreEqual(2, inputParameters.LevelOfCrestOfStructure.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(3.5, inputParameters.LevelOfCrestOfStructure.Mean.Value); + Assert.AreEqual(2, inputParameters.OrientationOfTheNormalOfTheStructure.NumberOfDecimalPlaces); + Assert.AreEqual(115, inputParameters.OrientationOfTheNormalOfTheStructure.Value); + Assert.AreEqual(2, inputParameters.AllowableIncreaseOfLevelForStorage.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(1.0, inputParameters.AllowableIncreaseOfLevelForStorage.Mean.Value); + Assert.AreEqual(2, inputParameters.StorageStructureArea.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(1000000, inputParameters.StorageStructureArea.Mean.Value); + Assert.AreEqual(2, inputParameters.FlowWidthAtBottomProtection.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(18, inputParameters.FlowWidthAtBottomProtection.Mean.Value); + Assert.AreEqual(2, inputParameters.CriticalOvertoppingDischarge.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(1, inputParameters.CriticalOvertoppingDischarge.Mean.Value); + Assert.AreEqual(2, inputParameters.WidthOfFlowApertures.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(18, inputParameters.WidthOfFlowApertures.Mean.Value); + Assert.AreEqual(2, inputParameters.DeviationOfTheWaveDirection.NumberOfDecimalPlaces); + Assert.AreEqual(1, inputParameters.DeviationOfTheWaveDirection.Value); + Assert.AreEqual(2, inputParameters.FailureProbabilityOfStructureGivenErosion.NumberOfDecimalPlaces); + Assert.AreEqual(1, inputParameters.FailureProbabilityOfStructureGivenErosion.Value); + } + private class TestHeightStructuresOutput : ProbabilisticOutput { public TestHeightStructuresOutput() : base(0, 0, 0, 0, 0) {} Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Services/HydraRingCalculationServiceTest.cs =================================================================== diff -u -rdec46d5efaad5332ffb2a96e67ec11209ddc5515 -r873b8bf10a9c767214fa5a3a1e6cf340e060657f --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Services/HydraRingCalculationServiceTest.cs (.../HydraRingCalculationServiceTest.cs) (revision dec46d5efaad5332ffb2a96e67ec11209ddc5515) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Services/HydraRingCalculationServiceTest.cs (.../HydraRingCalculationServiceTest.cs) (revision 873b8bf10a9c767214fa5a3a1e6cf340e060657f) @@ -75,23 +75,23 @@ // Setup var hlcdDirectory = "Invalid HLCD directory"; var hydraRingCalculationService = new HydraRingCalculationService(); - var incorrectStationId = 999; - var hydraRingSection = new HydraRingSection(incorrectStationId, "999", 0.0, 0.0); + var incorrectSectionId = 999; + var hydraRingSection = new HydraRingSection(incorrectSectionId, "999", 0.0, 0.0); var mockRepository = new MockRepository(); var hydraRingBreakWaterMock = mockRepository.StrictMock(0, 1.1); - var overtoppingCalculationInput = new OvertoppingCalculationInput(incorrectStationId, hydraRingSection, + var overtoppingCalculationInput = new OvertoppingCalculationInput(incorrectSectionId, hydraRingSection, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, new List(), new List(), hydraRingBreakWaterMock); - var outputFolder = Path.Combine(Path.GetTempPath(), "" + incorrectStationId); + var outputFolder = Path.Combine(Path.GetTempPath(), "" + incorrectSectionId); var outputFiles = new[] { - Path.Combine(outputFolder, incorrectStationId + ".ini"), - Path.Combine(outputFolder, incorrectStationId + ".sql"), + Path.Combine(outputFolder, incorrectSectionId + ".ini"), + Path.Combine(outputFolder, incorrectSectionId + ".sql"), Path.Combine(outputFolder, "temp.sqlite"), - Path.Combine(outputFolder, incorrectStationId + ".log") + Path.Combine(outputFolder, incorrectSectionId + ".log") }; using (new FileDisposeHelper(outputFiles))