Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs =================================================================== diff -u -rd3f74e71ab47dc8afda0c64ca923f2f889f4154b -r52289b39d16efbf1ea1cd2980d62a8541527d23c --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs (.../ClosingStructuresFailureMechanismViewTest.cs) (revision d3f74e71ab47dc8afda0c64ca923f2f889f4154b) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs (.../ClosingStructuresFailureMechanismViewTest.cs) (revision 52289b39d16efbf1ea1cd2980d62a8541527d23c) @@ -41,6 +41,7 @@ using Ringtoets.ClosingStructures.Data.TestUtil; using Ringtoets.ClosingStructures.Forms.PresentationObjects; using Ringtoets.ClosingStructures.Forms.Views; +using Ringtoets.Common.Forms.TestUtil; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; using ClosingStructuresDataResources = Ringtoets.ClosingStructures.Data.Properties.Resources; @@ -212,7 +213,7 @@ var mapDataList = mapData.Collection.ToList(); Assert.AreEqual(7, mapDataList.Count); AssertReferenceLineMapData(assessmentSection.ReferenceLine, mapDataList[referenceLineIndex]); - AssertFailureMechanismSectionsMapData(failureMechanism.Sections, mapDataList[sectionsIndex]); + MapDataTestHelper.AssertFailureMechanismSectionsMapData(failureMechanism.Sections, mapDataList[sectionsIndex]); AssertFailureMechanismSectionsStartPointMapData(failureMechanism.Sections, mapDataList[sectionsStartPointIndex]); AssertFailureMechanismSectionsEndPointMapData(failureMechanism.Sections, mapDataList[sectionsEndPointIndex]); AssertHydraulicBoundaryLocationsMapData(assessmentSection.HydraulicBoundaryDatabase, mapDataList[hydraulicBoundaryDatabaseIndex]); @@ -336,7 +337,7 @@ failureMechanism.NotifyObservers(); // Assert - AssertFailureMechanismSectionsMapData(failureMechanism.Sections, sectionMapData); + MapDataTestHelper.AssertFailureMechanismSectionsMapData(failureMechanism.Sections, sectionMapData); AssertFailureMechanismSectionsStartPointMapData(failureMechanism.Sections, sectionStartsMapData); AssertFailureMechanismSectionsEndPointMapData(failureMechanism.Sections, sectionsEndsMapData); } @@ -588,25 +589,6 @@ Assert.AreEqual("Hydraulische randvoorwaarden", mapData.Name); } - private static void AssertFailureMechanismSectionsMapData(IEnumerable sections, MapData mapData) - { - Assert.IsInstanceOf(mapData); - var sectionsMapLinesData = (MapLineData)mapData; - var sectionMapLinesFeatures = sectionsMapLinesData.Features.ToArray(); - Assert.AreEqual(1, sectionMapLinesFeatures.Length); - - var geometries = sectionMapLinesFeatures.First().MapGeometries.ToArray(); - var sectionsArray = sections.ToArray(); - Assert.AreEqual(sectionsArray.Length, geometries.Length); - - for (int index = 0; index < sectionsArray.Length; index++) - { - var failureMechanismSection = sectionsArray[index]; - CollectionAssert.AreEquivalent(failureMechanismSection.Points, geometries[index].PointCollections.First()); - } - Assert.AreEqual("Vakindeling", mapData.Name); - } - private static void AssertFailureMechanismSectionsStartPointMapData(IEnumerable sections, MapData mapData) { Assert.IsInstanceOf(mapData);