Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsCalculationsPropertiesTest.cs =================================================================== diff -u -r7a7b46d302b7b9ea84c2b4deb9ce333d071a5b73 -rf70cf1ed5434ce801e9c4805c3357ad8097d4295 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsCalculationsPropertiesTest.cs (.../MacroStabilityInwardsCalculationsPropertiesTest.cs) (revision 7a7b46d302b7b9ea84c2b4deb9ce333d071a5b73) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsCalculationsPropertiesTest.cs (.../MacroStabilityInwardsCalculationsPropertiesTest.cs) (revision f70cf1ed5434ce801e9c4805c3357ad8097d4295) @@ -19,10 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.ComponentModel; -using Core.Common.Base; -using Core.Common.TestUtil; using Core.Gui.TestUtil; using NUnit.Framework; using Rhino.Mocks; @@ -181,63 +178,5 @@ mocks.VerifyAll(); } - - [Test] - [SetCulture("nl-NL")] - [TestCase(-1)] - [TestCase(-0.1)] - [TestCase(1.1)] - [TestCase(8)] - public void A_SetInvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(double value) - { - // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - var observer = mocks.StrictMock(); - mocks.ReplayAll(); - - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - failureMechanism.Attach(observer); - - var properties = new MacroStabilityInwardsCalculationsProperties(failureMechanism, assessmentSection); - - // Call - void Call() => properties.A = value; - - // Assert - const string expectedMessage = "De waarde voor 'a' moet in het bereik [0,0, 1,0] liggen."; - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(Call, expectedMessage); - - mocks.VerifyAll(); - } - - [Test] - [TestCase(0)] - [TestCase(0.1)] - [TestCase(1)] - [TestCase(0.0000001)] - [TestCase(0.9999999)] - public void A_SetValidValue_SetsValueAndUpdatesObservers(double value) - { - // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - var observer = mocks.StrictMock(); - observer.Expect(o => o.UpdateObserver()); - mocks.ReplayAll(); - - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - failureMechanism.Attach(observer); - - var properties = new MacroStabilityInwardsCalculationsProperties(failureMechanism, assessmentSection); - - // Call - properties.A = value; - - // Assert - Assert.AreEqual(value, failureMechanism.MacroStabilityInwardsProbabilityAssessmentInput.A); - - mocks.VerifyAll(); - } } } \ No newline at end of file Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailurePathPropertiesTest.cs =================================================================== diff -u -r135e4770c78601dfb46d2b3387413e924ef7abb7 -rf70cf1ed5434ce801e9c4805c3357ad8097d4295 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailurePathPropertiesTest.cs (.../MacroStabilityInwardsFailurePathPropertiesTest.cs) (revision 135e4770c78601dfb46d2b3387413e924ef7abb7) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailurePathPropertiesTest.cs (.../MacroStabilityInwardsFailurePathPropertiesTest.cs) (revision f70cf1ed5434ce801e9c4805c3357ad8097d4295) @@ -19,10 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.ComponentModel; -using Core.Common.Base; -using Core.Common.TestUtil; using Core.Gui.TestUtil; using NUnit.Framework; using Rhino.Mocks; @@ -165,57 +162,5 @@ "De parameter 'N' die gebruikt wordt om het lengte-effect mee te nemen in de beoordeling (afgerond).", true); } - - [Test] - [SetCulture("nl-NL")] - [TestCase(-1)] - [TestCase(-0.1)] - [TestCase(1.1)] - [TestCase(8)] - public void A_SetInvalidValue_ThrowsArgumentOutOfRangeExceptionNoNotifications(double value) - { - // Setup - var assessmentSection = mocks.Stub(); - var observer = mocks.StrictMock(); - mocks.ReplayAll(); - - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - failureMechanism.Attach(observer); - - var properties = new MacroStabilityInwardsFailurePathProperties(failureMechanism, assessmentSection); - - // Call - void Call() => properties.A = value; - - // Assert - const string expectedMessage = "De waarde voor 'a' moet in het bereik [0,0, 1,0] liggen."; - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(Call, expectedMessage); - } - - [Test] - [TestCase(0)] - [TestCase(0.1)] - [TestCase(1)] - [TestCase(0.0000001)] - [TestCase(0.9999999)] - public void A_SetValidValue_SetsValueAndUpdatesObservers(double value) - { - // Setup - var assessmentSection = mocks.Stub(); - var observer = mocks.StrictMock(); - observer.Expect(o => o.UpdateObserver()); - mocks.ReplayAll(); - - var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - failureMechanism.Attach(observer); - - var properties = new MacroStabilityInwardsFailurePathProperties(failureMechanism, assessmentSection); - - // Call - properties.A = value; - - // Assert - Assert.AreEqual(value, failureMechanism.MacroStabilityInwardsProbabilityAssessmentInput.A); - } } } \ No newline at end of file