Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs =================================================================== diff -u -rf05ca3345e173bcdd462ca8ea4b6f12b2de86e2c -r3dba5efb1341e8aaba0de9848669b1c7e45cdfda --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs (.../StructuresInputBasePropertiesTest.cs) (revision f05ca3345e173bcdd462ca8ea4b6f12b2de86e2c) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs (.../StructuresInputBasePropertiesTest.cs) (revision 3dba5efb1341e8aaba0de9848669b1c7e45cdfda) @@ -240,9 +240,7 @@ } [Test] - [TestCase(double.MinValue)] - [TestCase(double.MaxValue)] - public void SetFailureProbabilityStructureWithErosion_InvalidValues_ThrowsArgumentException(double newValue) + public void SetStructure_NullValue_AfterSettingStructureCalled() { // Setup var assessmentSectionStub = mockRepository.Stub(); @@ -259,18 +257,18 @@ Data = inputContext }; + // Precondition + Assert.IsFalse(properties.AfterSettingStructureCalled); + // Call - TestDelegate call = () => properties.FailureProbabilityStructureWithErosion = newValue.ToString(CultureInfo.InvariantCulture); + properties.Structure = null; // Assert - var expectedMessage = "De waarde voor de faalkans is te groot of te klein."; - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage); - - mockRepository.VerifyAll(); + Assert.IsTrue(properties.AfterSettingStructureCalled); } [Test] - public void SetStructure_NullValue_AfterSettingStructureCalled() + public void SetStructure_ValidValue_AfterSettingStructureCalled() { // Setup var assessmentSectionStub = mockRepository.Stub(); @@ -291,14 +289,16 @@ Assert.IsFalse(properties.AfterSettingStructureCalled); // Call - properties.Structure = null; + properties.Structure = new SimpleStructure(); // Assert Assert.IsTrue(properties.AfterSettingStructureCalled); } [Test] - public void SetStructure_ValidValue_AfterSettingStructureCalled() + [TestCase(double.MinValue)] + [TestCase(double.MaxValue)] + public void SetFailureProbabilityStructureWithErosion_InvalidValues_ThrowsArgumentException(double newValue) { // Setup var assessmentSectionStub = mockRepository.Stub(); @@ -315,14 +315,14 @@ Data = inputContext }; - // Precondition - Assert.IsFalse(properties.AfterSettingStructureCalled); - // Call - properties.Structure = new SimpleStructure(); + TestDelegate call = () => properties.FailureProbabilityStructureWithErosion = newValue.ToString(CultureInfo.InvariantCulture); // Assert - Assert.IsTrue(properties.AfterSettingStructureCalled); + var expectedMessage = "De waarde voor de faalkans is te groot of te klein."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage); + + mockRepository.VerifyAll(); } [Test]