Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs =================================================================== diff -u -rc0532d07766ecad2566f7cfa4a97a9aeb6e8540c -rc4872aca10173bec0c5af50b33b152a8a0b1fad7 --- Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision c0532d07766ecad2566f7cfa4a97a9aeb6e8540c) +++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision c4872aca10173bec0c5af50b33b152a8a0b1fad7) @@ -810,109 +810,109 @@ { const double targetProbability = 1.0 / 30000; GeneralResult generalResult = null; - locations.ElementAt(0).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(0).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.78, targetProbability, 3.98788, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(1).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(1).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.77, targetProbability, 3.98787893, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(2).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(2).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.77, targetProbability, 3.98788, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(3).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(3).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.77, targetProbability, 3.98788, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(4).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(4).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.76865, targetProbability, 3.98788, 1.0 / 29996, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(5).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(5).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(6).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(6).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(7).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(7).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(8).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(8).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(9).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(9).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(10).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(10).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(11).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(11).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(12).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(12).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(13).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(13).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(14).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(14).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(15).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(15).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.54, targetProbability, 3.98788, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(16).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(16).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 5.86, targetProbability, 3.98788, 1.0 / 29994, 3.98783, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(17).DesignWaterLevelCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(17).DesignWaterLevelCalculation3.Output = new HydraulicBoundaryLocationOutput( 6.00, targetProbability, 3.98788, 1.0 / 29993, 3.98782, @@ -924,109 +924,109 @@ { const double targetProbability = 1.0 / 30000; GeneralResult generalResult = null; - locations.ElementAt(0).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(0).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 4.13, targetProbability, 3.98788, 1.0 / 29972, 3.98766, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(1).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(1).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 4.19, targetProbability, 3.98788, 1.0 / 29962, 3.98770, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(2).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(2).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 4.02, targetProbability, 3.98788, 1.0 / 29977, 3.98758, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(3).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(3).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 3.87, targetProbability, 3.98788, 1.0 / 29963, 3.98759, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(4).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(4).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 3.73, targetProbability, 3.98788, 1.0 / 29957, 3.98754, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(5).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(5).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 2.65, targetProbability, 3.98788, 1.0 / 30022, 3.98805, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(6).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(6).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 3.04, targetProbability, 3.98788, 1.0 / 30001, 3.98789, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(7).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(7).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 3.20, targetProbability, 3.98788, 1.0 / 30000, 3.98788, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(8).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(8).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 3.35, targetProbability, 3.98788, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(9).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(9).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 3.53, targetProbability, 3.98788, 1.0 / 29999, 3.98787, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(10).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(10).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 3.62, targetProbability, 3.98788, 1.0 / 29888, 3.98699, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(11).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(11).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 3.68, targetProbability, 3.98788, 1.0 / 29890, 3.98701, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(12).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(12).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 3.73, targetProbability, 3.98788, 1.0 / 29882, 3.98694, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(13).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(13).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 3.75, targetProbability, 3.98788, 1.0 / 29902, 3.98710, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(14).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(14).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 3.30, targetProbability, 3.98788, 1.0 / 30037, 3.98817, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(15).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(15).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 9.57, targetProbability, 3.98788, 1.0 / 29999, 3.98787, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(16).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(16).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 8.02, targetProbability, 3.98788, 1.0 / 30108, 3.98873, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(17).WaveHeightCalculation1.Output = new HydraulicBoundaryLocationOutput( + locations.ElementAt(17).WaveHeightCalculation3.Output = new HydraulicBoundaryLocationOutput( 4.11, targetProbability, 3.98788, 1.0 / 29929, 3.98732, Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs =================================================================== diff -u -r49b83b0b7a6e27398c290857bfe04a616f2274ac -rc4872aca10173bec0c5af50b33b152a8a0b1fad7 --- Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs (.../AddNewDemoAssessmentSectionCommandTest.cs) (revision 49b83b0b7a6e27398c290857bfe04a616f2274ac) +++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs (.../AddNewDemoAssessmentSectionCommandTest.cs) (revision c4872aca10173bec0c5af50b33b152a8a0b1fad7) @@ -124,20 +124,6 @@ #region General - private static void AssertDesignWaterLevel(double expectedValue, HydraulicBoundaryLocation hydraulicBoundaryLocation) - { - RoundedDouble designWaterLevel = hydraulicBoundaryLocation.DesignWaterLevelCalculation1.Output.Result; - - Assert.AreEqual((RoundedDouble) expectedValue, designWaterLevel, designWaterLevel.GetAccuracy()); - } - - private static void AssertWaveHeight(double expectedValue, HydraulicBoundaryLocation hydraulicBoundaryLocation) - { - RoundedDouble waveHeight = hydraulicBoundaryLocation.WaveHeightCalculation1.Output.Result; - - Assert.AreEqual((RoundedDouble) expectedValue, waveHeight, waveHeight.GetAccuracy()); - } - private static void AssertCalculationConvergence(IEnumerable calculations) { Assert.IsTrue(calculations.All(c => c.Output.CalculationConvergence == CalculationConvergence.CalculatedConverged)); @@ -189,48 +175,62 @@ private static void AssertDesignWaterLevelsForGrassCoverErosionOutwards(ObservableList locations) { - AssertDesignWaterLevel(7.19, locations[0]); - AssertDesignWaterLevel(7.19, locations[1]); - AssertDesignWaterLevel(7.18, locations[2]); - AssertDesignWaterLevel(7.18, locations[3]); - AssertDesignWaterLevel(7.18, locations[4]); - AssertDesignWaterLevel(7.39, locations[5]); - AssertDesignWaterLevel(7.39, locations[6]); - AssertDesignWaterLevel(7.39, locations[7]); - AssertDesignWaterLevel(7.40, locations[8]); - AssertDesignWaterLevel(7.40, locations[9]); - AssertDesignWaterLevel(7.40, locations[10]); - AssertDesignWaterLevel(7.40, locations[11]); - AssertDesignWaterLevel(7.40, locations[12]); - AssertDesignWaterLevel(7.41, locations[13]); - AssertDesignWaterLevel(7.41, locations[14]); - AssertDesignWaterLevel(6.91, locations[15]); - AssertDesignWaterLevel(7.53, locations[16]); - AssertDesignWaterLevel(7.80, locations[17]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.19, locations[0]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.19, locations[1]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.18, locations[2]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.18, locations[3]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.18, locations[4]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.39, locations[5]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.39, locations[6]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.39, locations[7]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.40, locations[8]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.40, locations[9]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.40, locations[10]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.40, locations[11]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.40, locations[12]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.41, locations[13]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.41, locations[14]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(6.91, locations[15]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.53, locations[16]); + AssertDesignWaterLevelForGrassCoverErosionOutwards(7.80, locations[17]); } + private static void AssertDesignWaterLevelForGrassCoverErosionOutwards(double expectedValue, HydraulicBoundaryLocation hydraulicBoundaryLocation) + { + RoundedDouble designWaterLevel = hydraulicBoundaryLocation.DesignWaterLevelCalculation1.Output.Result; + + Assert.AreEqual((RoundedDouble) expectedValue, designWaterLevel, designWaterLevel.GetAccuracy()); + } + private static void AssertWaveHeightsForGrassCoverErosionOutwards(ObservableList locations) { - AssertWaveHeight(4.99, locations[0]); - AssertWaveHeight(5.04, locations[1]); - AssertWaveHeight(4.87, locations[2]); - AssertWaveHeight(4.73, locations[3]); - AssertWaveHeight(4.59, locations[4]); - AssertWaveHeight(3.35, locations[5]); - AssertWaveHeight(3.83, locations[6]); - AssertWaveHeight(4.00, locations[7]); - AssertWaveHeight(4.20, locations[8]); - AssertWaveHeight(4.41, locations[9]); - AssertWaveHeight(4.50, locations[10]); - AssertWaveHeight(4.57, locations[11]); - AssertWaveHeight(4.63, locations[12]); - AssertWaveHeight(4.68, locations[13]); - AssertWaveHeight(4.17, locations[14]); - AssertWaveHeight(11.13, locations[15]); - AssertWaveHeight(9.24, locations[16]); - AssertWaveHeight(5.34, locations[17]); + AssertWaveHeightForGrassCoverErosionOutwards(4.99, locations[0]); + AssertWaveHeightForGrassCoverErosionOutwards(5.04, locations[1]); + AssertWaveHeightForGrassCoverErosionOutwards(4.87, locations[2]); + AssertWaveHeightForGrassCoverErosionOutwards(4.73, locations[3]); + AssertWaveHeightForGrassCoverErosionOutwards(4.59, locations[4]); + AssertWaveHeightForGrassCoverErosionOutwards(3.35, locations[5]); + AssertWaveHeightForGrassCoverErosionOutwards(3.83, locations[6]); + AssertWaveHeightForGrassCoverErosionOutwards(4.00, locations[7]); + AssertWaveHeightForGrassCoverErosionOutwards(4.20, locations[8]); + AssertWaveHeightForGrassCoverErosionOutwards(4.41, locations[9]); + AssertWaveHeightForGrassCoverErosionOutwards(4.50, locations[10]); + AssertWaveHeightForGrassCoverErosionOutwards(4.57, locations[11]); + AssertWaveHeightForGrassCoverErosionOutwards(4.63, locations[12]); + AssertWaveHeightForGrassCoverErosionOutwards(4.68, locations[13]); + AssertWaveHeightForGrassCoverErosionOutwards(4.17, locations[14]); + AssertWaveHeightForGrassCoverErosionOutwards(11.13, locations[15]); + AssertWaveHeightForGrassCoverErosionOutwards(9.24, locations[16]); + AssertWaveHeightForGrassCoverErosionOutwards(5.34, locations[17]); } + private static void AssertWaveHeightForGrassCoverErosionOutwards(double expectedValue, HydraulicBoundaryLocation hydraulicBoundaryLocation) + { + RoundedDouble waveHeight = hydraulicBoundaryLocation.WaveHeightCalculation1.Output.Result; + + Assert.AreEqual((RoundedDouble) expectedValue, waveHeight, waveHeight.GetAccuracy()); + } + private static void AssertExpectedGrassCoverErosionOutwardsWaveConditionsInput(WaveConditionsInput inputParameters) { Assert.AreEqual(1300001, inputParameters.HydraulicBoundaryLocation.Id); @@ -601,55 +601,69 @@ ObservableList hydraulicBoundaryLocations = demoAssessmentSection.HydraulicBoundaryDatabase.Locations; Assert.AreEqual(18, hydraulicBoundaryLocations.Count); AssertDesignWaterLevelsForAssessmentSection(hydraulicBoundaryLocations); - AssertCalculationConvergence(hydraulicBoundaryLocations.Select(hbl => hbl.DesignWaterLevelCalculation1)); - AssertWaveHeightValuesForAssessmentSection(hydraulicBoundaryLocations); - AssertCalculationConvergence(hydraulicBoundaryLocations.Select(hbl => hbl.WaveHeightCalculation1)); + AssertCalculationConvergence(hydraulicBoundaryLocations.Select(hbl => hbl.DesignWaterLevelCalculation3)); + AssertWaveHeightsForAssessmentSection(hydraulicBoundaryLocations); + AssertCalculationConvergence(hydraulicBoundaryLocations.Select(hbl => hbl.WaveHeightCalculation3)); } private static void AssertDesignWaterLevelsForAssessmentSection(ObservableList locations) { - AssertDesignWaterLevel(5.78, locations[0]); - AssertDesignWaterLevel(5.77, locations[1]); - AssertDesignWaterLevel(5.77, locations[2]); - AssertDesignWaterLevel(5.77, locations[3]); - AssertDesignWaterLevel(5.77, locations[4]); - AssertDesignWaterLevel(5.93, locations[5]); - AssertDesignWaterLevel(5.93, locations[6]); - AssertDesignWaterLevel(5.93, locations[7]); - AssertDesignWaterLevel(5.93, locations[8]); - AssertDesignWaterLevel(5.93, locations[9]); - AssertDesignWaterLevel(5.93, locations[10]); - AssertDesignWaterLevel(5.93, locations[11]); - AssertDesignWaterLevel(5.93, locations[12]); - AssertDesignWaterLevel(5.93, locations[13]); - AssertDesignWaterLevel(5.93, locations[14]); - AssertDesignWaterLevel(5.54, locations[15]); - AssertDesignWaterLevel(5.86, locations[16]); - AssertDesignWaterLevel(6.00, locations[17]); + AssertDesignWaterLevelForAssessmentSection(5.78, locations[0]); + AssertDesignWaterLevelForAssessmentSection(5.77, locations[1]); + AssertDesignWaterLevelForAssessmentSection(5.77, locations[2]); + AssertDesignWaterLevelForAssessmentSection(5.77, locations[3]); + AssertDesignWaterLevelForAssessmentSection(5.77, locations[4]); + AssertDesignWaterLevelForAssessmentSection(5.93, locations[5]); + AssertDesignWaterLevelForAssessmentSection(5.93, locations[6]); + AssertDesignWaterLevelForAssessmentSection(5.93, locations[7]); + AssertDesignWaterLevelForAssessmentSection(5.93, locations[8]); + AssertDesignWaterLevelForAssessmentSection(5.93, locations[9]); + AssertDesignWaterLevelForAssessmentSection(5.93, locations[10]); + AssertDesignWaterLevelForAssessmentSection(5.93, locations[11]); + AssertDesignWaterLevelForAssessmentSection(5.93, locations[12]); + AssertDesignWaterLevelForAssessmentSection(5.93, locations[13]); + AssertDesignWaterLevelForAssessmentSection(5.93, locations[14]); + AssertDesignWaterLevelForAssessmentSection(5.54, locations[15]); + AssertDesignWaterLevelForAssessmentSection(5.86, locations[16]); + AssertDesignWaterLevelForAssessmentSection(6.00, locations[17]); } - private static void AssertWaveHeightValuesForAssessmentSection(ObservableList locations) + private static void AssertDesignWaterLevelForAssessmentSection(double expectedValue, HydraulicBoundaryLocation hydraulicBoundaryLocation) { - AssertWaveHeight(4.13, locations[0]); - AssertWaveHeight(4.19, locations[1]); - AssertWaveHeight(4.02, locations[2]); - AssertWaveHeight(3.87, locations[3]); - AssertWaveHeight(3.73, locations[4]); - AssertWaveHeight(2.65, locations[5]); - AssertWaveHeight(3.04, locations[6]); - AssertWaveHeight(3.20, locations[7]); - AssertWaveHeight(3.35, locations[8]); - AssertWaveHeight(3.53, locations[9]); - AssertWaveHeight(3.62, locations[10]); - AssertWaveHeight(3.68, locations[11]); - AssertWaveHeight(3.73, locations[12]); - AssertWaveHeight(3.75, locations[13]); - AssertWaveHeight(3.30, locations[14]); - AssertWaveHeight(9.57, locations[15]); - AssertWaveHeight(8.02, locations[16]); - AssertWaveHeight(4.11, locations[17]); + RoundedDouble designWaterLevel = hydraulicBoundaryLocation.DesignWaterLevelCalculation3.Output.Result; + + Assert.AreEqual((RoundedDouble) expectedValue, designWaterLevel, designWaterLevel.GetAccuracy()); } + private static void AssertWaveHeightsForAssessmentSection(ObservableList locations) + { + AssertWaveHeightForAssessmentSection(4.13, locations[0]); + AssertWaveHeightForAssessmentSection(4.19, locations[1]); + AssertWaveHeightForAssessmentSection(4.02, locations[2]); + AssertWaveHeightForAssessmentSection(3.87, locations[3]); + AssertWaveHeightForAssessmentSection(3.73, locations[4]); + AssertWaveHeightForAssessmentSection(2.65, locations[5]); + AssertWaveHeightForAssessmentSection(3.04, locations[6]); + AssertWaveHeightForAssessmentSection(3.20, locations[7]); + AssertWaveHeightForAssessmentSection(3.35, locations[8]); + AssertWaveHeightForAssessmentSection(3.53, locations[9]); + AssertWaveHeightForAssessmentSection(3.62, locations[10]); + AssertWaveHeightForAssessmentSection(3.68, locations[11]); + AssertWaveHeightForAssessmentSection(3.73, locations[12]); + AssertWaveHeightForAssessmentSection(3.75, locations[13]); + AssertWaveHeightForAssessmentSection(3.30, locations[14]); + AssertWaveHeightForAssessmentSection(9.57, locations[15]); + AssertWaveHeightForAssessmentSection(8.02, locations[16]); + AssertWaveHeightForAssessmentSection(4.11, locations[17]); + } + + private static void AssertWaveHeightForAssessmentSection(double expectedValue, HydraulicBoundaryLocation hydraulicBoundaryLocation) + { + RoundedDouble waveHeight = hydraulicBoundaryLocation.WaveHeightCalculation3.Output.Result; + + Assert.AreEqual((RoundedDouble) expectedValue, waveHeight, waveHeight.GetAccuracy()); + } + #endregion } } \ No newline at end of file