Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressesPropertiesTest.cs =================================================================== diff -u -r32125960d547005d1921cec69ec05aab83e0cd40 -r28d9f08e359c89436494ad63a6cb7832baa10341 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressesPropertiesTest.cs (.../MacroStabilityInwardsWaterStressesPropertiesTest.cs) (revision 32125960d547005d1921cec69ec05aab83e0cd40) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressesPropertiesTest.cs (.../MacroStabilityInwardsWaterStressesPropertiesTest.cs) (revision 28d9f08e359c89436494ad63a6cb7832baa10341) @@ -65,7 +65,7 @@ var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); // Call - var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel, propertyChangeHandler); + var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel(), propertyChangeHandler); // Assert Assert.IsInstanceOf>(properties); @@ -92,7 +92,7 @@ mocks.ReplayAll(); // Call - TestDelegate call = () => new MacroStabilityInwardsWaterStressesProperties(null, GetTestNormativeAssessmentLevel, propertyChangeHandler); + TestDelegate call = () => new MacroStabilityInwardsWaterStressesProperties(null, GetTestNormativeAssessmentLevel(), propertyChangeHandler); // Assert var exception = Assert.Throws(call); @@ -101,31 +101,13 @@ } [Test] - public void Constructor_GetNormativeAssessmentLevelFuncNull_ThrowsArgumentNullException() - { - // Setup - var mocks = new MockRepository(); - var propertyChangeHandler = mocks.Stub(); - mocks.ReplayAll(); - - var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); - - // Call - TestDelegate call = () => new MacroStabilityInwardsWaterStressesProperties(input, null, propertyChangeHandler); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("getNormativeAssessmentLevelFunc", exception.ParamName); - } - - [Test] public void Constructor_PropertyChangeHandlerNull_ThrowsArgumentNullException() { // Setup var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); // Call - TestDelegate call = () => new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel, null); + TestDelegate call = () => new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel(), null); // Assert var exception = Assert.Throws(call); @@ -143,7 +125,7 @@ var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); // Call - var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel, propertyChangeHandler); + var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel(), propertyChangeHandler); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); @@ -268,7 +250,7 @@ var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); // Call - var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel, propertyChangeHandler); + var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel(), propertyChangeHandler); // Assert Assert.AreEqual(input.WaterLevelRiverAverage, properties.WaterLevelRiverAverage); @@ -296,7 +278,7 @@ MacroStabilityInwardsInput input = calculationItem.InputParameters; var handler = new ObservablePropertyChangeHandler(calculationItem, input); - var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel, handler); + var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel(), handler); var random = new Random(21); double waterLevelRiverAverage = random.NextDouble(); @@ -453,7 +435,7 @@ mocks.ReplayAll(); var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); - var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel, propertyChangeHandler); + var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel(), propertyChangeHandler); // Call string toString = properties.ToString(); @@ -483,7 +465,7 @@ observable }); - var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel, handler); + var properties = new MacroStabilityInwardsWaterStressesProperties(input, GetTestNormativeAssessmentLevel(), handler); // Call setProperty(properties);