Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs =================================================================== diff -u -r63e64c82e06f820a466370a462394dc5396219e3 -r7d42e59aadbea2c27f2f6eb97640c5d8ecc56e1c --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs (.../HeightStructuresCalculationTest.cs) (revision 63e64c82e06f820a466370a462394dc5396219e3) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresCalculationTest.cs (.../HeightStructuresCalculationTest.cs) (revision 7d42e59aadbea2c27f2f6eb97640c5d8ecc56e1c) @@ -23,6 +23,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probability; +using Ringtoets.HydraRing.Data; namespace Ringtoets.HeightStructures.Data.Test { @@ -116,6 +117,24 @@ Assert.AreSame(calculation.Output, output); } + [Test] + public void ClearHydraulicBoundaryLocation_Always_SetHydraulicBoundaryLocationToNull() + { + // Setup + var calculation = new HeightStructuresCalculation(); + var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "test", 1.0, 2.0); + calculation.InputParameters.HydraulicBoundaryLocation = hydraulicBoundaryLocation; + + // Precondition + Assert.AreSame(hydraulicBoundaryLocation, calculation.InputParameters.HydraulicBoundaryLocation); + + // Call + calculation.ClearHydraulicBoundaryLocation(); + + // Assert + Assert.IsNull(calculation.InputParameters.HydraulicBoundaryLocation); + } + private void AssertDemoInput(HeightStructuresInput inputParameters) { Assert.AreEqual(2, inputParameters.LevelOfCrestOfStructure.Mean.NumberOfDecimalPlaces);