Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs =================================================================== diff -u -r9850308f656f62eb130bc70debd17f588b1ae4a5 -r8142644ec1337be8032e9214b1f103c85d9037f7 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision 9850308f656f62eb130bc70debd17f588b1ae4a5) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision 8142644ec1337be8032e9214b1f103c85d9037f7) @@ -379,13 +379,26 @@ } [Test] + public void AssessmentLevel_HydraulicBoundaryCalculationUncalculated_AssessmentLevelNaN() + { + // Setup + var input = new PipingInput(new GeneralPipingInput()); + input.HydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, string.Empty, 0.0, 0.0); + + // Call + var calculatedAssessmentLevel = input.AssessmentLevel; + + // Assert + Assert.IsNaN(calculatedAssessmentLevel); + } + + [Test] public void AssessmentLevel_InputHasNewHydraulicBoundaryLocationSet_AssessmentLevelUpdated() { // Setup PipingInput input = new PipingInput(new GeneralPipingInput()); RoundedDouble testLevel = (RoundedDouble) new Random(21).NextDouble(); - input.HydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, string.Empty, 0.0, 0.0) { DesignWaterLevel = testLevel @@ -399,6 +412,22 @@ } [Test] + public void AssessmentLevel_SetAssessmentLevelWithNoHydraulicBoundaryLocation_SetsAssessmentLevel() + { + // Setup + PipingInput input = new PipingInput(new GeneralPipingInput()); + + RoundedDouble testLevel = (RoundedDouble)new Random(21).NextDouble(); + + // Call + input.AssessmentLevel = testLevel; + + // Assert + Assert.AreEqual(2, input.AssessmentLevel.NumberOfDecimalPlaces); + Assert.AreEqual(testLevel, input.AssessmentLevel, input.AssessmentLevel.GetAccuracy()); + } + + [Test] public void PiezometricHeadExit_ValidInput_SetsParametersForCalculatorAndReturnsPiezometricHead() { // Setup