Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismViewTest.cs =================================================================== diff -u -rb6c0d3a160059b4f7c428b3b51ae923e59104bb1 -rf2582640849a5a4afce5674db823c37e1edaea19 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismViewTest.cs (.../HeightStructuresFailureMechanismViewTest.cs) (revision b6c0d3a160059b4f7c428b3b51ae923e59104bb1) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismViewTest.cs (.../HeightStructuresFailureMechanismViewTest.cs) (revision f2582640849a5a4afce5674db823c37e1edaea19) @@ -26,6 +26,7 @@ using Core.Components.DotSpatial.Forms; using Core.Components.Gis.Data; using Core.Components.Gis.Forms; +using Core.Components.Gis.Geometries; using NUnit.Framework; using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; @@ -184,9 +185,7 @@ // Assert Assert.AreSame(failureMechanismContext, view.Data); AssertEmptyMapData(view.Map.Data); - ImageBasedMapData expectedImageBasedMapData = RingtoetsBackgroundMapDataFactory.CreateBackgroundMapData( - assessmentSection.BackgroundData); - MapDataTestHelper.AssertImageBasedMapData(expectedImageBasedMapData, view.Map.BackgroundMapData); + MapDataTestHelper.AssertImageBasedMapData(assessmentSection.BackgroundData, view.Map.BackgroundMapData); } } @@ -277,7 +276,7 @@ // Assert Assert.AreSame(failureMechanismContext, view.Data); - var mapData = map.Data; + MapDataCollection mapData = map.Data; Assert.IsInstanceOf(mapData); var mapDataList = mapData.Collection.ToList(); @@ -327,7 +326,7 @@ view.Data = failureMechanismContext; - var hydraulicBoundaryLocationsMapData = map.Data.Collection.ElementAt(hydraulicBoundaryLocationsIndex); + MapData hydraulicBoundaryLocationsMapData = map.Data.Collection.ElementAt(hydraulicBoundaryLocationsIndex); // Precondition MapDataTestHelper.AssertHydraulicBoundaryLocationsMapData(hydraulicBoundaryDatabase1.Locations, hydraulicBoundaryLocationsMapData); @@ -366,7 +365,7 @@ view.Data = failureMechanismContext; - var hydraulicBoundaryLocationsMapData = map.Data.Collection.ElementAt(hydraulicBoundaryLocationsIndex); + MapData hydraulicBoundaryLocationsMapData = map.Data.Collection.ElementAt(hydraulicBoundaryLocationsIndex); // Precondition MapDataTestHelper.AssertHydraulicBoundaryLocationsMapData(hydraulicBoundaryDatabase.Locations, hydraulicBoundaryLocationsMapData); @@ -410,7 +409,7 @@ view.Data = new HeightStructuresFailureMechanismContext(new HeightStructuresFailureMechanism(), assessmentSection); - var hydraulicBoundaryLocationsMapData = map.Data.Collection.ElementAt(hydraulicBoundaryLocationsIndex); + MapData hydraulicBoundaryLocationsMapData = map.Data.Collection.ElementAt(hydraulicBoundaryLocationsIndex); // Precondition MapDataTestHelper.AssertHydraulicBoundaryLocationsMapData(currentHydraulicBoundaryDatabase.Locations, hydraulicBoundaryLocationsMapData); @@ -456,7 +455,7 @@ view.Data = failureMechanismContext; - var referenceLineMapData = map.Data.Collection.ElementAt(referenceLineIndex); + MapData referenceLineMapData = map.Data.Collection.ElementAt(referenceLineIndex); // Precondition MapDataTestHelper.AssertReferenceLineMapData(assessmentSection.ReferenceLine, referenceLineMapData); @@ -521,7 +520,7 @@ view.Data = failureMechanismContext; - var foreshoreProfileData = map.Data.Collection.ElementAt(foreshoreProfilesIndex); + MapData foreshoreProfileData = map.Data.Collection.ElementAt(foreshoreProfilesIndex); // Precondition MapDataTestHelper.AssertForeshoreProfilesMapData(failureMechanism.ForeshoreProfiles, foreshoreProfileData); @@ -554,7 +553,7 @@ view.Data = failureMechanismContext; - var structuresData = map.Data.Collection.ElementAt(structuresIndex); + MapData structuresData = map.Data.Collection.ElementAt(structuresIndex); // Precondition AssertStructures(failureMechanism.HeightStructures, structuresData); @@ -719,7 +718,7 @@ view.Data = failureMechanismContext; - var mapData = map.Data; + MapDataCollection mapData = map.Data; var dataToMove = (MapLineData) map.Data.Collection.ElementAt(referenceLineIndex); mapData.Remove(dataToMove); @@ -757,7 +756,7 @@ new Point2D(2.0, 5.0), new Point2D(4.0, 3.0) }; - ReferenceLine referenceLine = new ReferenceLine(); + var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(points); assessmentSection.ReferenceLine = referenceLine; @@ -834,9 +833,9 @@ Assert.AreEqual(structuresArray.Length, structuresData.Features.Length); - for (int i = 0; i < structuresArray.Length; i++) + for (var i = 0; i < structuresArray.Length; i++) { - var profileDataA = structuresData.Features[i].MapGeometries.First(); + MapGeometry profileDataA = structuresData.Features[i].MapGeometries.First(); Assert.AreEqual(structuresArray[0].Location, profileDataA.PointCollections.First().First()); } @@ -851,7 +850,7 @@ var calculationsFeatures = calculationsMapData.Features.ToArray(); Assert.AreEqual(calculationsArray.Length, calculationsFeatures.Length); - for (int index = 0; index < calculationsArray.Length; index++) + for (var index = 0; index < calculationsArray.Length; index++) { var geometries = calculationsFeatures[index].MapGeometries.ToArray(); Assert.AreEqual(1, geometries.Length);