Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismView.cs =================================================================== diff -u -r748397d6d26a542b144be5f5bd4e1f8f3ff30086 -re6136967285d64c823a38b828f710b74f2a3dba9 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismView.cs (.../HeightStructuresFailureMechanismView.cs) (revision 748397d6d26a542b144be5f5bd4e1f8f3ff30086) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismView.cs (.../HeightStructuresFailureMechanismView.cs) (revision e6136967285d64c823a38b828f710b74f2a3dba9) @@ -245,7 +245,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryDatabaseFeatures(AssessmentSection.HydraulicBoundaryDatabase); + hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismViewTest.cs =================================================================== diff -u -r748397d6d26a542b144be5f5bd4e1f8f3ff30086 -re6136967285d64c823a38b828f710b74f2a3dba9 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismViewTest.cs (.../HeightStructuresFailureMechanismViewTest.cs) (revision 748397d6d26a542b144be5f5bd4e1f8f3ff30086) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismViewTest.cs (.../HeightStructuresFailureMechanismViewTest.cs) (revision e6136967285d64c823a38b828f710b74f2a3dba9) @@ -186,15 +186,9 @@ var assessmentSection = new ObservableTestAssessmentSectionStub { - HydraulicBoundaryDatabase = - { - Locations = - { - new HydraulicBoundaryLocation(1, "test", 1.0, 2.0) - } - }, ReferenceLine = referenceLine }; + assessmentSection.AddHydraulicBoundaryLocation(new HydraulicBoundaryLocation(1, "test", 1.0, 2.0)); // Call using (var view = new HeightStructuresFailureMechanismView(failureMechanism, assessmentSection)) @@ -224,16 +218,8 @@ public void GivenViewWithHydraulicBoundarLocationsData_WhenHydraulicBoundaryLocationsUpdatedAndNotified_ThenMapDataUpdated() { // Given - var assessmentSection = new ObservableTestAssessmentSectionStub - { - HydraulicBoundaryDatabase = - { - Locations = - { - new HydraulicBoundaryLocation(1, "test1", 1.0, 2.0) - } - } - }; + var assessmentSection = new ObservableTestAssessmentSectionStub(); + assessmentSection.AddHydraulicBoundaryLocation(new HydraulicBoundaryLocation(1, "test", 1.0, 2.0)); using (var view = new HeightStructuresFailureMechanismView(new HeightStructuresFailureMechanism(), assessmentSection)) { @@ -251,7 +237,7 @@ hydraulicBoundaryLocationsMapData); // When - assessmentSection.HydraulicBoundaryDatabase.Locations.Add(new HydraulicBoundaryLocation(2, "test2", 3.0, 4.0)); + assessmentSection.AddHydraulicBoundaryLocation(new HydraulicBoundaryLocation(2, "test2", 3.0, 4.0)); assessmentSection.HydraulicBoundaryDatabase.Locations.NotifyObservers(); // Then @@ -266,16 +252,8 @@ { // Given var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "test1", 1.0, 2.0); - var assessmentSection = new ObservableTestAssessmentSectionStub - { - HydraulicBoundaryDatabase = - { - Locations = - { - hydraulicBoundaryLocation - } - } - }; + var assessmentSection = new ObservableTestAssessmentSectionStub(); + assessmentSection.AddHydraulicBoundaryLocation(hydraulicBoundaryLocation); var random = new Random(21); using (var view = new HeightStructuresFailureMechanismView(new HeightStructuresFailureMechanism(), assessmentSection)) @@ -290,8 +268,7 @@ MapData hydraulicBoundaryLocationsMapData = map.Data.Collection.ElementAt(hydraulicBoundaryLocationsIndex); // Precondition - MapDataTestHelper.AssertHydraulicBoundaryLocationOutputsMapData(assessmentSection.HydraulicBoundaryDatabase.Locations, - hydraulicBoundaryLocationsMapData); + MapDataTestHelper.AssertHydraulicBoundaryLocationOutputsMapData(assessmentSection, hydraulicBoundaryLocationsMapData); // When hydraulicBoundaryLocation.DesignWaterLevelCalculation1.Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()); @@ -305,8 +282,7 @@ hydraulicBoundaryLocation.NotifyObservers(); // Then - MapDataTestHelper.AssertHydraulicBoundaryLocationOutputsMapData(assessmentSection.HydraulicBoundaryDatabase.Locations, - hydraulicBoundaryLocationsMapData); + MapDataTestHelper.AssertHydraulicBoundaryLocationOutputsMapData(assessmentSection, hydraulicBoundaryLocationsMapData); mocks.VerifyAll(); } }