Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/MacroStabilityOutwardsFailureMechanismPropertiesTest.cs =================================================================== diff -u -r2ef5183542af0464fab4ebadb3a6c2c4f7ff46b7 -r8820d80a97281c96db5f89d5af6c74d26e0f5bca --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/MacroStabilityOutwardsFailureMechanismPropertiesTest.cs (.../MacroStabilityOutwardsFailureMechanismPropertiesTest.cs) (revision 2ef5183542af0464fab4ebadb3a6c2c4f7ff46b7) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/MacroStabilityOutwardsFailureMechanismPropertiesTest.cs (.../MacroStabilityOutwardsFailureMechanismPropertiesTest.cs) (revision 8820d80a97281c96db5f89d5af6c74d26e0f5bca) @@ -21,9 +21,11 @@ using System; using System.ComponentModel; +using Core.Common.Base; using Core.Common.Gui.PropertyBag; using Core.Common.TestUtil; using NUnit.Framework; +using Rhino.Mocks; using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Integration.Data.StandAlone; @@ -193,10 +195,15 @@ [TestCase(-0.1)] [TestCase(1.1)] [TestCase(8)] - public void A_SetInvalidValue_ThrowsArgumentOutOfRangeException(double value) + public void A_SetInvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(double value) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + mocks.ReplayAll(); + var failureMechanism = new MacroStabilityOutwardsFailureMechanism(); + failureMechanism.Attach(observer); var properties = new MacroStabilityOutwardsFailureMechanismProperties(failureMechanism); // Call @@ -205,6 +212,7 @@ // Assert var exception = Assert.Throws(call); Assert.AreEqual("De waarde moet in het bereik [0,0, 1,0] liggen.", exception.Message); + mocks.VerifyAll(); } [Test] @@ -213,17 +221,24 @@ [TestCase(1)] [TestCase(0.0000001)] [TestCase(0.9999999)] - public void A_SetValidValue_SetsValue(double value) + public void A_SetValidValue_SetsValueAndUpdatesObserver(double value) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + var failureMechanism = new MacroStabilityOutwardsFailureMechanism(); + failureMechanism.Attach(observer); var properties = new MacroStabilityOutwardsFailureMechanismProperties(failureMechanism); // Call properties.A = value; // Assert Assert.AreEqual(value, failureMechanism.MacroStabilityOutwardsProbabilityAssessmentInput.A); + mocks.VerifyAll(); } [Test]