Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsOutputViewTest.cs =================================================================== diff -u -r365f33fe0130eac94cacb979165488d9ae124f3c -r7b8a021f38d77546b7c3318f5f0dedda63168f91 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsOutputViewTest.cs (.../MacroStabilityInwardsOutputViewTest.cs) (revision 365f33fe0130eac94cacb979165488d9ae124f3c) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsOutputViewTest.cs (.../MacroStabilityInwardsOutputViewTest.cs) (revision 7b8a021f38d77546b7c3318f5f0dedda63168f91) @@ -21,12 +21,10 @@ using System.Linq; using System.Windows.Forms; -using Core.Common.Base; using Core.Common.Base.Geometry; using Core.Components.Chart.Data; using Core.Components.Chart.Forms; using NUnit.Framework; -using Rhino.Mocks; using Ringtoets.Common.Forms.TestUtil; using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.MacroStabilityInwards.Data.SoilProfile; @@ -318,11 +316,6 @@ public void GivenViewWithOutputSet_WhenOutputUpdated_ThenTableUpdated() { // Given - var mocks = new MockRepository(); - var observer = mocks.StrictMock(); - observer.Expect(o => o.UpdateObserver()); - mocks.ReplayAll(); - using (var view = new MacroStabilityInwardsOutputView()) { MacroStabilityInwardsSlicesTable slicesTable = GetSlicesTable(view); @@ -349,25 +342,18 @@ Assert.AreEqual(1, slicesTable.Rows.Count); // When - calculation.InputParameters.Attach(observer); calculation.Output = MacroStabilityInwardsOutputTestFactory.CreateOutput(); - calculation.InputParameters.NotifyObservers(); + calculation.NotifyObservers(); // Then Assert.AreEqual(3, slicesTable.Rows.Count); - mocks.VerifyAll(); } } [Test] public void GivenViewWithOutputSet_WhenOutputCleared_ThenTableCleared() { - // Given - var mocks = new MockRepository(); - var observer = mocks.StrictMock(); - observer.Expect(o => o.UpdateObserver()); - mocks.ReplayAll(); - + // Give using (var view = new MacroStabilityInwardsOutputView()) { MacroStabilityInwardsSlicesTable slicesTable = GetSlicesTable(view); @@ -383,13 +369,11 @@ Assert.AreEqual(3, slicesTable.Rows.Count); // When - calculation.InputParameters.Attach(observer); calculation.ClearOutput(); - calculation.InputParameters.NotifyObservers(); + calculation.NotifyObservers(); // Then Assert.AreEqual(0, slicesTable.Rows.Count); - mocks.VerifyAll(); } }