Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/DikeProfileTest.cs =================================================================== diff -u -ra520ed551c5eecc830c54d4373f1efc82c64cb5f -r886c94611e3a5cc72a9e134a7fb02ba617fe7f38 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/DikeProfileTest.cs (.../DikeProfileTest.cs) (revision a520ed551c5eecc830c54d4373f1efc82c64cb5f) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/DikeProfileTest.cs (.../DikeProfileTest.cs) (revision 886c94611e3a5cc72a9e134a7fb02ba617fe7f38) @@ -20,9 +20,9 @@ // All rights reserved. using System; -using System.Linq; using Core.Common.Base.Data; using Core.Common.Base.Geometry; +using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.GrassCoverErosionInwards.Data.Properties; @@ -87,8 +87,7 @@ TestDelegate call = () => new DikeProfile(new Point2D(0, 0), null, new Point2D[0]); // Assert - var exception = Assert.Throws(call); - StringAssert.StartsWith(Resources.DikeProfile_SetGeometry_Collection_of_points_for_geometry_is_null, exception.Message); + var exception = TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, Resources.DikeProfile_SetGeometry_Collection_of_points_for_geometry_is_null); Assert.AreEqual("points", exception.ParamName); } @@ -102,8 +101,7 @@ }, new Point2D[0]); // Assert - var exception = Assert.Throws(call); - StringAssert.StartsWith(Resources.DikeProfile_SetGeometry_A_point_in_the_collection_is_null, exception.Message); + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, Resources.DikeProfile_SetGeometry_A_point_in_the_collection_is_null); } [Test] @@ -113,8 +111,7 @@ TestDelegate call = () => new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], null); // Assert - var exception = Assert.Throws(call); - StringAssert.StartsWith(Resources.DikeProfile_SetForeshoreGeometry_Collection_of_points_for_foreshore_geometry_is_null, exception.Message); + var exception = TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, Resources.DikeProfile_SetForeshoreGeometry_Collection_of_points_for_foreshore_geometry_is_null); Assert.AreEqual("points", exception.ParamName); } @@ -128,8 +125,7 @@ }); // Assert - var exception = Assert.Throws(call); - StringAssert.StartsWith(Resources.DikeProfile_SetForeshoreGeometry_A_point_in_the_collection_is_null, exception.Message); + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, Resources.DikeProfile_SetForeshoreGeometry_A_point_in_the_collection_is_null); } [Test]