Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Calculation/Math2DTest.cs =================================================================== diff -u -r3dfdbd9071b9b71d541cb5380004d8b43e3e8f25 -rf69d756f50ae1464a1a11f0780b6d6aa646f3114 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Calculation/Math2DTest.cs (.../Math2DTest.cs) (revision 3dfdbd9071b9b71d541cb5380004d8b43e3e8f25) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/Calculation/Math2DTest.cs (.../Math2DTest.cs) (revision f69d756f50ae1464a1a11f0780b6d6aa646f3114) @@ -3,6 +3,7 @@ using NUnit.Framework; using Ringtoets.Piping.Data; using Ringtoets.Piping.IO.Calculation; +using Ringtoets.Piping.IO.Properties; namespace Ringtoets.Piping.IO.Test.Calculation { @@ -152,6 +153,20 @@ } [Test] + public void LineIntersectionWithLine_WithEqualPoints_ThrowsArgumentException() + { + // Call + TestDelegate testA = () => Math2D.LineIntersectionWithLine(new Point2D(0,0), new Point2D(0,0), new Point2D(1,0), new Point2D(0,1)); + TestDelegate testB = () => Math2D.LineIntersectionWithLine(new Point2D(0, 1), new Point2D(0, 0), new Point2D(1, 1), new Point2D(1, 1)); + + // Assert + var exceptionA = Assert.Throws(testA); + var exceptionB = Assert.Throws(testB); + Assert.AreEqual(Resources.Math2D_LineIntersectionWithLine_Line_points_are_equal,exceptionA.Message); + Assert.AreEqual(Resources.Math2D_LineIntersectionWithLine_Line_points_are_equal,exceptionB.Message); + } + + [Test] public void LineIntersectionWithLine_InterSectionsHigherUpX_ReturnsIntersectionWithTolerance() { // Setup