Index: Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverFailurePathProperties.cs =================================================================== diff -u -rf9ca24058b91d70a3ff903638831960c76899d95 -ref37178ba647c277a7514166566f846fda14f7e0 --- Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverFailurePathProperties.cs (.../StabilityStoneCoverFailurePathProperties.cs) (revision f9ca24058b91d70a3ff903638831960c76899d95) +++ Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverFailurePathProperties.cs (.../StabilityStoneCoverFailurePathProperties.cs) (revision ef37178ba647c277a7514166566f846fda14f7e0) @@ -74,6 +74,7 @@ set { data.GeneralInput.N = value; + data.NotifyObservers(); } } @@ -94,6 +95,5 @@ } #endregion - } } \ No newline at end of file Index: Riskeer/StabilityStoneCover/test/Riskeer.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverFailurePathPropertiesTest.cs =================================================================== diff -u -rf9ca24058b91d70a3ff903638831960c76899d95 -ref37178ba647c277a7514166566f846fda14f7e0 --- Riskeer/StabilityStoneCover/test/Riskeer.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverFailurePathPropertiesTest.cs (.../StabilityStoneCoverFailurePathPropertiesTest.cs) (revision f9ca24058b91d70a3ff903638831960c76899d95) +++ Riskeer/StabilityStoneCover/test/Riskeer.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverFailurePathPropertiesTest.cs (.../StabilityStoneCoverFailurePathPropertiesTest.cs) (revision ef37178ba647c277a7514166566f846fda14f7e0) @@ -28,7 +28,6 @@ using NUnit.Framework; using Rhino.Mocks; using Riskeer.Common.Data.TestUtil; -using Riskeer.Common.Forms.TestUtil; using Riskeer.StabilityStoneCover.Data; using Riskeer.StabilityStoneCover.Forms.PropertyClasses; @@ -131,17 +130,7 @@ public void N_SetInvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(double newN) { // Setup - var observable = mocks.StrictMock(); - mocks.ReplayAll(); - var failureMechanism = new StabilityStoneCoverFailureMechanism(); - var handler = new FailureMechanismSetPropertyValueAfterConfirmationParameterTester( - failureMechanism, - (RoundedDouble) newN, - new[] - { - observable - }); var properties = new StabilityStoneCoverFailurePathProperties(failureMechanism); @@ -151,9 +140,6 @@ // Assert const string expectedMessage = "De waarde voor 'N' moet in het bereik [1,00, 20,00] liggen."; TestHelper.AssertThrowsArgumentExceptionAndTestMessage(Call, expectedMessage); - Assert.IsTrue(handler.Called); - - mocks.VerifyAll(); } [Test] @@ -163,18 +149,12 @@ public void N_SetValidValue_UpdateDataAndNotifyObservers(double newN) { // Setup - var observable = mocks.StrictMock(); - observable.Expect(o => o.NotifyObservers()); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); var failureMechanism = new StabilityStoneCoverFailureMechanism(); - var handler = new FailureMechanismSetPropertyValueAfterConfirmationParameterTester( - failureMechanism, - (RoundedDouble) newN, - new[] - { - observable - }); + failureMechanism.Attach(observer); var properties = new StabilityStoneCoverFailurePathProperties(failureMechanism); @@ -183,7 +163,6 @@ // Assert Assert.AreEqual(newN, failureMechanism.GeneralInput.N, failureMechanism.GeneralInput.N.GetAccuracy()); - Assert.IsTrue(handler.Called); mocks.VerifyAll(); }