Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs =================================================================== diff -u -re9d34986f2e90e63bbf6ebba579c24055c1c3853 -r970b9cc4f1ec36d6be67bcc2fb5ffdfe126044a2 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs (.../ClosingStructuresFailureMechanismViewTest.cs) (revision e9d34986f2e90e63bbf6ebba579c24055c1c3853) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismViewTest.cs (.../ClosingStructuresFailureMechanismViewTest.cs) (revision 970b9cc4f1ec36d6be67bcc2fb5ffdfe126044a2) @@ -597,10 +597,10 @@ // Precondition MapDataTestHelper.AssertForeshoreProfilesMapData(failureMechanism.ForeshoreProfiles, foreshoreProfileData); - + // Call var foreshoreProfileToUpdateFrom = new TestForeshoreProfile("originalProfile ID", new[] - { + { new Point2D(2, 2), new Point2D(3, 3) }); @@ -609,7 +609,7 @@ // Assert MapDataTestHelper.AssertForeshoreProfilesMapData(failureMechanism.ForeshoreProfiles, foreshoreProfileData); - mocks.ReplayAll(); + mocks.VerifyAll(); } } @@ -784,6 +784,7 @@ Structure = new TestClosingStructure(calculationLocationA) } }; + failureMechanism.CalculationsGroup.Children.Add(calculationA); view.Data = failureMechanismContext; @@ -828,18 +829,25 @@ Structure = new TestClosingStructure(calculationLocationA) } }; + failureMechanism.CalculationsGroup.Children.Add(calculationA); view.Data = failureMechanismContext; var calculationMapData = (MapLineData) map.Data.Collection.ElementAt(calculationsIndex); + var mocks = new MockRepository(); + IObserver[] observers = AttachMapDataObservers(mocks, map.Data.Collection); + observers[calculationsIndex].Expect(obs => obs.UpdateObserver()); + mocks.ReplayAll(); + calculationA.Name = "new name"; // Call calculationA.NotifyObservers(); // Assert AssertCalculationsMapData(failureMechanism.Calculations.Cast>(), calculationMapData); + mocks.VerifyAll(); } } @@ -1074,7 +1082,7 @@ var hydraulicBoundaryLocationsMapDataObserver = mocks.StrictMock(); mapDataArray[hydraulicBoundaryLocationsIndex].Attach(hydraulicBoundaryLocationsMapDataObserver); - + var foreshoreProfilesMapDataObserver = mocks.StrictMock(); mapDataArray[foreshoreProfilesIndex].Attach(foreshoreProfilesMapDataObserver);