Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputValidatorTest.cs =================================================================== diff -u -r9368b3ac19481ec8b10dcea903ecdf0fab3048cf -re4e0e6f48ce1decab5f8a3831d8663abc1799fbb --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputValidatorTest.cs (.../MacroStabilityInwardsInputValidatorTest.cs) (revision 9368b3ac19481ec8b10dcea903ecdf0fab3048cf) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputValidatorTest.cs (.../MacroStabilityInwardsInputValidatorTest.cs) (revision e4e0e6f48ce1decab5f8a3831d8663abc1799fbb) @@ -303,6 +303,56 @@ CollectionAssert.IsEmpty(messages); } + [Test] + public void Validate_MultipleTangentLinesWithTangentLineTopAndBottomSame_ReturnsError() + { + // Setup + var random = new Random(21); + input.TangentLineNumber = random.Next(2, 50); + input.TangentLineZTop = (RoundedDouble) 1.5; + input.TangentLineZBottom = (RoundedDouble) 1.5; + + // Call + IEnumerable messages = MacroStabilityInwardsInputValidator.Validate(input).ToArray(); + + // Assert + CollectionAssert.AreEqual(new[] + { + "Het aantal tangentlijnen moet 1 zijn wanneer tangentlijn Z-boven gelijk is aan tangentlijn Z-onder." + }, messages); + } + + [Test] + public void Validate_MultipleTangentLinesWithTangentLineTopAndBottomNotSame_ReturnsEmpty() + { + // Setup + var random = new Random(21); + input.TangentLineNumber = random.Next(2, 50); + input.TangentLineZTop = (RoundedDouble) 1.5; + input.TangentLineZBottom = (RoundedDouble) 0.2; + + // Call + IEnumerable messages = MacroStabilityInwardsInputValidator.Validate(input).ToArray(); + + // Assert + CollectionAssert.IsEmpty(messages); + } + + [Test] + public void Validate_SingleTangentLineWithTangentLineTopAndBottomSame_ReturnsEmpty() + { + // Setup + input.TangentLineNumber = 1; + input.TangentLineZTop = (RoundedDouble) 1.59; + input.TangentLineZBottom = (RoundedDouble) 1.59; + + // Call + IEnumerable messages = MacroStabilityInwardsInputValidator.Validate(input).ToArray(); + + // Assert + CollectionAssert.IsEmpty(messages); + } + private static IEnumerable SurfacelineNotOnMacroStabilityInwardsSoilProfile2D() { yield return new TestCaseData(