Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismView.cs =================================================================== diff -u -r8b1ba587f1690980bde6da911c4eba3ae7473969 -r7059d843f431dfa8273a154c9febf582ee2bd957 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismView.cs (.../ClosingStructuresFailureMechanismView.cs) (revision 8b1ba587f1690980bde6da911c4eba3ae7473969) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismView.cs (.../ClosingStructuresFailureMechanismView.cs) (revision 7059d843f431dfa8273a154c9febf582ee2bd957) @@ -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,14 +211,9 @@ 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))) + .Select(pc => pc.InputParameters))) { Observable = FailureMechanism.CalculationsGroup }; Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs =================================================================== diff -u -r8b1ba587f1690980bde6da911c4eba3ae7473969 -r7059d843f431dfa8273a154c9febf582ee2bd957 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs (.../ClosingStructuresFailureMechanismViewTest.cs) (revision 8b1ba587f1690980bde6da911c4eba3ae7473969) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs (.../ClosingStructuresFailureMechanismViewTest.cs) (revision 7059d843f431dfa8273a154c9febf582ee2bd957) @@ -256,7 +256,7 @@ using (var view = new ClosingStructuresFailureMechanismView(new ClosingStructuresFailureMechanism(), assessmentSection)) { - IMapControl map = ((RingtoetsMapControl)view.Controls[0]).MapControl; + IMapControl map = ((RingtoetsMapControl) view.Controls[0]).MapControl; MapData hydraulicBoundaryLocationsMapData = map.Data.Collection.ElementAt(hydraulicBoundaryLocationsIndex); @@ -274,46 +274,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 ClosingStructuresFailureMechanismView(new ClosingStructuresFailureMechanism(), 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