Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/MapDataTestHelperTest.cs =================================================================== diff -u -ra2eb198a93d224a701f3fa4d6a68023e22ebcd79 -r3f1ac36864e2e1cbb1d41869e928eed116f0a310 --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/MapDataTestHelperTest.cs (.../MapDataTestHelperTest.cs) (revision a2eb198a93d224a701f3fa4d6a68023e22ebcd79) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/MapDataTestHelperTest.cs (.../MapDataTestHelperTest.cs) (revision 3f1ac36864e2e1cbb1d41869e928eed116f0a310) @@ -19,9 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System.Collections.Generic; using System.Linq; -using Core.Common.Base.Data; using Core.Common.Base.Geometry; using Core.Components.Gis.Data; using Core.Components.Gis.Features; @@ -960,35 +958,13 @@ var mapData = new MapPointData("Voorlandprofielen"); // Call - TestDelegate test = () => MapDataTestHelper.AssertForeshoreProfiles(Enumerable.Empty(), new IEnumerable[0], mapData); + TestDelegate test = () => MapDataTestHelper.AssertForeshoreProfiles(Enumerable.Empty(), mapData); // Assert Assert.Throws(test); } [Test] - public void AssertForeshoreProfiles_ForeshoreProfileLengthNotSameAsExpectedGeometryLength_ThrowAssertionException() - { - // Setup - var mapData = new MapLineData("Voorlandprofielen"); - var foreshoreProfiles = new[] - { - new TestForeshoreProfile() - }; - var expectedGeometry = new[] - { - new Point2D[0], - new Point2D[0] - }; - - // Call - TestDelegate test = () => MapDataTestHelper.AssertForeshoreProfiles(foreshoreProfiles, expectedGeometry, mapData); - - // Assert - Assert.Throws(test); - } - - [Test] public void AssertForeshoreProfiles_ForeshoreProfileLengthNotSameAsMapDataFeaturesLength_ThrowAssertionException() { // Setup @@ -1002,23 +978,18 @@ var foreshoreProfiles = new[] { new TestForeshoreProfile(), - new TestForeshoreProfile(), + new TestForeshoreProfile() }; - var expectedGeometry = new[] - { - new Point2D[0], - new Point2D[0] - }; // Call - TestDelegate test = () => MapDataTestHelper.AssertForeshoreProfiles(foreshoreProfiles, expectedGeometry, mapData); + TestDelegate test = () => MapDataTestHelper.AssertForeshoreProfiles(foreshoreProfiles, mapData); // Assert Assert.Throws(test); } [Test] - public void AssertForeshoreProfiles_ExpectedGeometryNotSameAsFeatureGeometry_ThrowAssertionException() + public void AssertForeshoreProfiles_FeatureGeometryNotSameAsExpectedGeometry_ThrowAssertionException() { // Setup var mapData = new MapLineData("Voorlandprofielen") @@ -1031,28 +1002,24 @@ { new [] { - new Point2D(0, 0), - new Point2D(1, 1), + new Point2D(0, 1), + new Point2D(0, -2) } }) }) } }; var foreshoreProfiles = new[] { - new TestForeshoreProfile(), + new TestForeshoreProfile(new [] + { + new Point2D(0, 0), + new Point2D(1, 1) + }) }; - var expectedGeometry = new[] - { - new[] - { - new Point2D(0, 0), - new Point2D(2, 2) - } - }; // Call - TestDelegate test = () => MapDataTestHelper.AssertForeshoreProfiles(foreshoreProfiles, expectedGeometry, mapData); + TestDelegate test = () => MapDataTestHelper.AssertForeshoreProfiles(foreshoreProfiles, mapData); // Assert Assert.Throws(test); @@ -1072,28 +1039,24 @@ { new [] { - new Point2D(0, 0), - new Point2D(1, 1), + new Point2D(0, 0), + new Point2D(0, -1) } }) }) } }; var foreshoreProfiles = new[] { - new TestForeshoreProfile(), + new TestForeshoreProfile(new [] + { + new Point2D(0, 0), + new Point2D(1, 1) + }) }; - var expectedGeometry = new[] - { - new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - } - }; // Call - TestDelegate test = () => MapDataTestHelper.AssertForeshoreProfiles(foreshoreProfiles, expectedGeometry, mapData); + TestDelegate test = () => MapDataTestHelper.AssertForeshoreProfiles(foreshoreProfiles, mapData); // Assert Assert.Throws(test); @@ -1114,27 +1077,23 @@ new [] { new Point2D(0, 0), - new Point2D(1, 1) + new Point2D(0, -1) } }) }) } }; var foreshoreProfiles = new[] { - new TestForeshoreProfile(), + new TestForeshoreProfile(new [] + { + new Point2D(0, 0), + new Point2D(1, 1) + }) }; - var expectedGeometry = new[] - { - new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - } - }; // Call - TestDelegate test = () => MapDataTestHelper.AssertForeshoreProfiles(foreshoreProfiles, expectedGeometry, mapData); + TestDelegate test = () => MapDataTestHelper.AssertForeshoreProfiles(foreshoreProfiles, mapData); // Assert Assert.DoesNotThrow(test);