Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresInputTest.cs =================================================================== diff -u -rc1bb09f8fce943d069316e4d9bac7c85aca50c58 -r8d42f78b73ab49db2934de47d82664ea0a1f2458 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresInputTest.cs (.../StabilityPointStructuresInputTest.cs) (revision c1bb09f8fce943d069316e4d9bac7c85aca50c58) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresInputTest.cs (.../StabilityPointStructuresInputTest.cs) (revision 8d42f78b73ab49db2934de47d82664ea0a1f2458) @@ -961,21 +961,37 @@ } [Test] - public void VerticalDistance_Always_ExpectedValues() + [TestCase(double.NaN)] + [TestCase(0)] + public void VerticalDistance_ValidValue_ExpectedValues(double verticalDistance) { // Setup - var random = new Random(22); var input = new StabilityPointStructuresInput(); - var verticalDistance = new RoundedDouble(5, random.NextDouble()); // Call - input.VerticalDistance = verticalDistance; + input.VerticalDistance = (RoundedDouble) verticalDistance; // Assert Assert.AreEqual(2, input.VerticalDistance.NumberOfDecimalPlaces); AssertAreEqual(verticalDistance, input.VerticalDistance); } + [Test] + [TestCase(double.NaN)] + [TestCase(0)] + public void VerticalDistance_InvalidValue_ThrowsArgumentOutOfRangException(double verticalDistance) + { + // Setup + var input = new StabilityPointStructuresInput(); + + // Call + TestDelegate call = () => input.VerticalDistance = (RoundedDouble) (-0.01); + + // Assert + TestHelper.AssertThrowsArgumentExceptionAndTestMessage( + call, "De waarde voor afstand onderkant wand en teen dijk moet groter of gelijk zijn aan 0."); + } + #endregion #region Helpers