Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputValidatorTest.cs =================================================================== diff -u -r08a1d37783424699debf8c053dc95a75df38d8dc -r0c5bcfd7a61efa90f83d11dd36c4d8582a78d63f --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputValidatorTest.cs (.../MacroStabilityInwardsInputValidatorTest.cs) (revision 08a1d37783424699debf8c053dc95a75df38d8dc) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputValidatorTest.cs (.../MacroStabilityInwardsInputValidatorTest.cs) (revision 0c5bcfd7a61efa90f83d11dd36c4d8582a78d63f) @@ -360,6 +360,54 @@ CollectionAssert.IsEmpty(messages); } + [Test] + public void Validate_MultipleTangentLinesWithTangentLineTopAndBottomSame_ReturnsError() + { + // Setup + input.TangentLineNumber = 3; + 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 + input.TangentLineNumber = 4; + 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(