Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Factories/WaveConditionsChartDataPointsFactory.cs =================================================================== diff -u -rdadaa43d997676fe70eabaeaf42bd878d9d803a5 -r5d517d1330fbcd67b88a1f23d01e006e1ad98c1c --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Factories/WaveConditionsChartDataPointsFactory.cs (.../WaveConditionsChartDataPointsFactory.cs) (revision dadaa43d997676fe70eabaeaf42bd878d9d803a5) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Factories/WaveConditionsChartDataPointsFactory.cs (.../WaveConditionsChartDataPointsFactory.cs) (revision 5d517d1330fbcd67b88a1f23d01e006e1ad98c1c) @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Core.Common.Base.Data; using Core.Common.Base.Geometry; using Core.Components.Chart.Data; using Ringtoets.Common.Data.DikeProfiles; @@ -209,15 +210,16 @@ /// Create water levels geometry points in 2D space based on the provided . /// /// The to create the water levels geometry points for. + /// The normative assessment level to use while determining water levels. /// A collection with collections of points in 2D space or an empty list when: /// /// is null; /// no water levels could be determined. /// /// - public static IEnumerable> CreateWaterLevelsGeometryPoints(WaveConditionsInput input) + public static IEnumerable> CreateWaterLevelsGeometryPoints(WaveConditionsInput input, RoundedDouble normativeAssessmentLevel) { - return input?.GetWaterLevels(input.AssessmentLevel) + return input?.GetWaterLevels(normativeAssessmentLevel) .Select(waterLevel => CreateGeometryPoints(input, () => waterLevel)) .ToArray() ?? new IEnumerable[0]; } Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Views/WaveConditionsInputView.cs =================================================================== diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -r5d517d1330fbcd67b88a1f23d01e006e1ad98c1c --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Views/WaveConditionsInputView.cs (.../WaveConditionsInputView.cs) (revision ac96d7c315129af851634ed5a4a6800b59ede718) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Views/WaveConditionsInputView.cs (.../WaveConditionsInputView.cs) (revision 5d517d1330fbcd67b88a1f23d01e006e1ad98c1c) @@ -176,7 +176,7 @@ lowerBoundaryWaterLevelsChartData.Points = WaveConditionsChartDataPointsFactory.CreateLowerBoundaryWaterLevelsGeometryPoints(input); upperBoundaryWaterLevelsChartData.Points = WaveConditionsChartDataPointsFactory.CreateUpperBoundaryWaterLevelsGeometryPoints(input); designWaterLevelChartData.Points = WaveConditionsChartDataPointsFactory.CreateDesignWaterLevelGeometryPoints(input); - waterLevelsChartData.Lines = WaveConditionsChartDataPointsFactory.CreateWaterLevelsGeometryPoints(input); + waterLevelsChartData.Lines = WaveConditionsChartDataPointsFactory.CreateWaterLevelsGeometryPoints(input, input.AssessmentLevel); revetmentBaseChartData.Points = WaveConditionsChartDataPointsFactory.CreateRevetmentBaseGeometryPoints(input); revetmentChartData.Points = WaveConditionsChartDataPointsFactory.CreateRevetmentGeometryPoints(input); } Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Factories/WaveConditionsChartDataPointsFactoryTest.cs =================================================================== diff -u -rdadaa43d997676fe70eabaeaf42bd878d9d803a5 -r5d517d1330fbcd67b88a1f23d01e006e1ad98c1c --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Factories/WaveConditionsChartDataPointsFactoryTest.cs (.../WaveConditionsChartDataPointsFactoryTest.cs) (revision dadaa43d997676fe70eabaeaf42bd878d9d803a5) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Factories/WaveConditionsChartDataPointsFactoryTest.cs (.../WaveConditionsChartDataPointsFactoryTest.cs) (revision 5d517d1330fbcd67b88a1f23d01e006e1ad98c1c) @@ -391,7 +391,7 @@ [Test] public void CreateLowerBoundaryRevetmentGeometryPoints_NoForeshoreProfile_ReturnsLowerBoundaryRevetmentGeometryPointsCollection() { - // Call + // Setup var input = new WaveConditionsInput { LowerBoundaryRevetment = (RoundedDouble) 3 @@ -412,7 +412,7 @@ [Test] public void CreateLowerBoundaryRevetmentGeometryPoints_UseForeshoreProfileFalse_ReturnsLowerBoundaryRevetmentGeometryPointsCollection() { - // Call + // Setup var input = new WaveConditionsInput { LowerBoundaryRevetment = (RoundedDouble) 3, @@ -444,7 +444,7 @@ public void CreateLowerBoundaryRevetmentGeometryPoints_WithForeshoreProfile_ReturnsLowerBoundaryRevetmentGeometryPointsCollection( IEnumerable foreshoreProfileGeometry) { - // Call + // Setup var input = new WaveConditionsInput { LowerBoundaryRevetment = (RoundedDouble) 3, @@ -489,7 +489,7 @@ [Test] public void CreateUpperBoundaryRevetmentGeometryPoints_NoForeshoreProfile_ReturnsUpperBoundaryRevetmentGeometryPointsCollection() { - // Call + // Setup var input = new WaveConditionsInput { UpperBoundaryRevetment = (RoundedDouble) 9 @@ -510,7 +510,7 @@ [Test] public void CreateUpperBoundaryRevetmentGeometryPoints_UseForeshoreProfileFalse_ReturnsUpperBoundaryRevetmentGeometryPointsCollection() { - // Call + // Setup var input = new WaveConditionsInput { UpperBoundaryRevetment = (RoundedDouble) 9, @@ -542,7 +542,7 @@ public void CreateUpperBoundaryRevetmentGeometryPoints_WithForeshoreProfile_ReturnsUpperBoundaryRevetmentGeometryPointsCollection( IEnumerable foreshoreProfileGeometry) { - // Call + // Setup var input = new WaveConditionsInput { UpperBoundaryRevetment = (RoundedDouble) 8, @@ -587,7 +587,7 @@ [Test] public void CreateLowerBoundaryWaterLevelsGeometryPoints_NoForeshoreProfile_ReturnsLowerBoundaryWaterLevelsGeometryPointsCollection() { - // Call + // Setup var input = new WaveConditionsInput { LowerBoundaryWaterLevels = (RoundedDouble) 3 @@ -608,7 +608,7 @@ [Test] public void CreateLowerBoundaryWaterLevelsGeometryPoints_UseForeshoreProfileFalse_ReturnsLowerBoundaryWaterLevelsGeometryPointsCollection() { - // Call + // Setup var input = new WaveConditionsInput { LowerBoundaryWaterLevels = (RoundedDouble) 3, @@ -640,7 +640,7 @@ public void CreateLowerBoundaryWaterLevelsGeometryPoints_WithForeshoreProfile_ReturnsLowerBoundaryWaterLevelsGeometryPointsCollection( IEnumerable foreshoreProfileGeometry) { - // Call + // Setup var input = new WaveConditionsInput { LowerBoundaryWaterLevels = (RoundedDouble) 3, @@ -685,7 +685,7 @@ [Test] public void CreateUpperBoundaryWaterLevelsGeometryPoints_NoForeshoreProfile_ReturnsUpperBoundaryWaterLevelsGeometryPointsCollection() { - // Call + // Setup var input = new WaveConditionsInput { UpperBoundaryWaterLevels = (RoundedDouble) 9 @@ -706,7 +706,7 @@ [Test] public void CreateUpperBoundaryWaterLevelsGeometryPoints_UseForeshoreProfileFalse_ReturnsUpperBoundaryWaterLevelsGeometryPointsCollection() { - // Call + // Setup var input = new WaveConditionsInput { UpperBoundaryWaterLevels = (RoundedDouble) 9, @@ -738,7 +738,7 @@ public void CreateUpperBoundaryWaterLevelsGeometryPoints_WithForeshoreProfile_ReturnsUpperBoundaryWaterLevelsGeometryPointsCollection( IEnumerable foreshoreProfileGeometry) { - // Call + // Setup var input = new WaveConditionsInput { UpperBoundaryWaterLevels = (RoundedDouble) 9, @@ -799,7 +799,7 @@ [Test] public void CreateDesignWaterLevelGeometryPoints_NoForeshoreProfile_ReturnsDesignWaterLevelGeometryPointsCollection() { - // Call + // Setup var input = new WaveConditionsInput { HydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(6) @@ -820,7 +820,7 @@ [Test] public void CreateDesignWaterLevelGeometryPoints_UseForeshoreProfileFalse_ReturnsDesignWaterLevelGeometryPointsCollection() { - // Call + // Setup var input = new WaveConditionsInput { HydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(6), @@ -852,7 +852,7 @@ public void CreateDesignWaterLevelGeometryPoints_WithForeshoreProfile_ReturnsDesignWaterLevelGeometryPointsCollection( IEnumerable foreshoreProfileGeometry) { - // Call + // Setup var input = new WaveConditionsInput { HydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(6), @@ -878,7 +878,7 @@ public void CreateWaterLevelsGeometryPoints_InputNull_ReturnsEmptyLinesList() { // Call - IEnumerable> lines = WaveConditionsChartDataPointsFactory.CreateWaterLevelsGeometryPoints(null); + IEnumerable> lines = WaveConditionsChartDataPointsFactory.CreateWaterLevelsGeometryPoints(null, RoundedDouble.NaN); // Assert CollectionAssert.IsEmpty(lines); @@ -891,7 +891,7 @@ var input = new WaveConditionsInput(); // Call - IEnumerable> lines = WaveConditionsChartDataPointsFactory.CreateWaterLevelsGeometryPoints(input); + IEnumerable> lines = WaveConditionsChartDataPointsFactory.CreateWaterLevelsGeometryPoints(input, RoundedDouble.NaN); // Assert CollectionAssert.IsEmpty(lines); @@ -900,17 +900,16 @@ [Test] public void CreateWaterLevelsGeometryPoints_NoForeshoreProfile_ReturnsWaterLevelsGeometryPointsCollection() { - // Call + // Setup var input = new WaveConditionsInput { - HydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(6.01), LowerBoundaryRevetment = (RoundedDouble) 5, UpperBoundaryRevetment = (RoundedDouble) 7, StepSize = WaveConditionsInputStepSize.One }; // Call - IEnumerable> lines = WaveConditionsChartDataPointsFactory.CreateWaterLevelsGeometryPoints(input); + IEnumerable> lines = WaveConditionsChartDataPointsFactory.CreateWaterLevelsGeometryPoints(input, (RoundedDouble) 6.01); // Assert var expectedLines = new[] @@ -938,23 +937,23 @@ public void CreateWaterLevelsGeometryPoints_WithForeshoreProfile_ReturnsWaterLevelsGeometryPointsCollection( IEnumerable foreshoreProfileGeometry) { - // Call + // Setup + var normativeAssessmentLevel = (RoundedDouble) 6.01; var input = new WaveConditionsInput { ForeshoreProfile = new TestForeshoreProfile(foreshoreProfileGeometry), - HydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(6.01), LowerBoundaryRevetment = (RoundedDouble) 5, UpperBoundaryRevetment = (RoundedDouble) 7, StepSize = WaveConditionsInputStepSize.One }; // Call - IEnumerable> lines = WaveConditionsChartDataPointsFactory.CreateWaterLevelsGeometryPoints(input); + IEnumerable> lines = WaveConditionsChartDataPointsFactory.CreateWaterLevelsGeometryPoints(input, normativeAssessmentLevel); // Assert Point2D lastGeometryPoint = foreshoreProfileGeometry.Last(); - IEnumerable waterLevels = input.GetWaterLevels(input.AssessmentLevel); + IEnumerable waterLevels = input.GetWaterLevels(normativeAssessmentLevel); var expectedLines = new[] {