Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismView.cs =================================================================== diff -u -r86b1d98cc8f33f759fc0e5f2d89d95d55f5f230b -r7a08ac93e04efa631f4b5242bca771c0d4b3078a --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismView.cs (.../StabilityPointStructuresFailureMechanismView.cs) (revision 86b1d98cc8f33f759fc0e5f2d89d95d55f5f230b) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismView.cs (.../StabilityPointStructuresFailureMechanismView.cs) (revision 7a08ac93e04efa631f4b5242bca771c0d4b3078a) @@ -67,7 +67,6 @@ private RecursiveObserver, HydraulicBoundaryLocationCalculation> waveHeightCalculationsForSignalingNormObserver; private RecursiveObserver, HydraulicBoundaryLocationCalculation> waveHeightCalculationsForLowerLimitNormObserver; private RecursiveObserver, HydraulicBoundaryLocationCalculation> waveHeightCalculationsForFactorizedLowerLimitNormObserver; - private RecursiveObserver, HydraulicBoundaryLocation> hydraulicBoundaryLocationObserver; private RecursiveObserver calculationInputObserver; private RecursiveObserver calculationGroupObserver; private RecursiveObserver> calculationObserver; @@ -156,7 +155,6 @@ waveHeightCalculationsForLowerLimitNormObserver.Dispose(); waveHeightCalculationsForFactorizedLowerLimitNormObserver.Dispose(); hydraulicBoundaryLocationsObserver.Dispose(); - hydraulicBoundaryLocationObserver.Dispose(); foreshoreProfilesObserver.Dispose(); foreshoreProfileObserver.Dispose(); calculationInputObserver.Dispose(); @@ -213,11 +211,6 @@ waveHeightCalculationsForFactorizedLowerLimitNormObserver = ObserverHelper.CreateHydraulicBoundaryLocationCalculationsObserver( AssessmentSection.WaveHeightCalculationsForFactorizedLowerLimitNorm, UpdateHydraulicBoundaryLocationsMapData); - hydraulicBoundaryLocationObserver = new RecursiveObserver, HydraulicBoundaryLocation>( - UpdateHydraulicBoundaryLocationsMapData, hbl => hbl) - { - Observable = AssessmentSection.HydraulicBoundaryDatabase.Locations - }; calculationInputObserver = new RecursiveObserver( UpdateCalculationsMapData, pcg => pcg.Children.Concat(pcg.Children.OfType>() .Select(pc => pc.InputParameters))) Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismViewTest.cs =================================================================== diff -u -r86b1d98cc8f33f759fc0e5f2d89d95d55f5f230b -r7a08ac93e04efa631f4b5242bca771c0d4b3078a --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismViewTest.cs (.../StabilityPointStructuresFailureMechanismViewTest.cs) (revision 86b1d98cc8f33f759fc0e5f2d89d95d55f5f230b) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismViewTest.cs (.../StabilityPointStructuresFailureMechanismViewTest.cs) (revision 7a08ac93e04efa631f4b5242bca771c0d4b3078a) @@ -257,7 +257,7 @@ using (var view = new StabilityPointStructuresFailureMechanismView(new StabilityPointStructuresFailureMechanism(), assessmentSection)) { - IMapControl map = ((RingtoetsMapControl)view.Controls[0]).MapControl; + IMapControl map = ((RingtoetsMapControl) view.Controls[0]).MapControl; MapData hydraulicBoundaryLocationsMapData = map.Data.Collection.ElementAt(hydraulicBoundaryLocationsIndex); @@ -275,46 +275,6 @@ } [Test] - public void GivenViewWithHydraulicBoundaryLocationsData_WhenLocationUpdatedAndNotified_ThenMapDataUpdated() - { - // Given - var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "test1", 1.0, 2.0); - var assessmentSection = new ObservableTestAssessmentSectionStub(); - assessmentSection.AddHydraulicBoundaryLocation(hydraulicBoundaryLocation); - - var random = new Random(21); - using (var view = new StabilityPointStructuresFailureMechanismView(new StabilityPointStructuresFailureMechanism(), assessmentSection)) - { - IMapControl map = ((RingtoetsMapControl) view.Controls[0]).MapControl; - - var mocks = new MockRepository(); - IObserver[] observers = AttachMapDataObservers(mocks, map.Data.Collection); - observers[hydraulicBoundaryLocationsIndex].Expect(obs => obs.UpdateObserver()); - mocks.ReplayAll(); - - MapData hydraulicBoundaryLocationsMapData = map.Data.Collection.ElementAt(hydraulicBoundaryLocationsIndex); - - // Precondition - MapDataTestHelper.AssertHydraulicBoundaryLocationOutputsMapData(assessmentSection, hydraulicBoundaryLocationsMapData); - - // When - hydraulicBoundaryLocation.DesignWaterLevelCalculation1.Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()); - hydraulicBoundaryLocation.DesignWaterLevelCalculation2.Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()); - hydraulicBoundaryLocation.DesignWaterLevelCalculation3.Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()); - hydraulicBoundaryLocation.DesignWaterLevelCalculation4.Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()); - hydraulicBoundaryLocation.WaveHeightCalculation1.Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()); - hydraulicBoundaryLocation.WaveHeightCalculation2.Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()); - hydraulicBoundaryLocation.WaveHeightCalculation3.Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()); - hydraulicBoundaryLocation.WaveHeightCalculation4.Output = new TestHydraulicBoundaryLocationOutput(random.NextDouble()); - hydraulicBoundaryLocation.NotifyObservers(); - - // Then - MapDataTestHelper.AssertHydraulicBoundaryLocationOutputsMapData(assessmentSection, hydraulicBoundaryLocationsMapData); - mocks.VerifyAll(); - } - } - - [Test] public void GivenViewWithReferenceLineData_WhenReferenceLineUpdatedAndNotified_ThenMapDataUpdated() { // Given