Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressLinesPropertiesTest.cs =================================================================== diff -u -r43b4218e6e71896eb4f3985555258caeb4c7f6f7 -ra2d856fc0440ec50ccb651fa9f2ca3c000f1f3d2 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressLinesPropertiesTest.cs (.../MacroStabilityInwardsWaterStressLinesPropertiesTest.cs) (revision 43b4218e6e71896eb4f3985555258caeb4c7f6f7) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressLinesPropertiesTest.cs (.../MacroStabilityInwardsWaterStressLinesPropertiesTest.cs) (revision a2d856fc0440ec50ccb651fa9f2ca3c000f1f3d2) @@ -21,6 +21,7 @@ using System; using System.ComponentModel; +using Core.Common.Base.Data; using Core.Common.Gui.PropertyBag; using Core.Common.TestUtil; using NUnit.Framework; @@ -36,21 +37,35 @@ public void Constructor_DataNull_ThrowsArgumentNullException() { // Call - TestDelegate test = () => new MacroStabilityInwardsWaterStressLinesProperties(null); + TestDelegate test = () => new MacroStabilityInwardsWaterStressLinesProperties(null, GetTestNormativeAssessmentLevel); // Assert var exception = Assert.Throws(test); Assert.AreEqual("data", exception.ParamName); } [Test] + public void Constructor_GetNormativeAssessmentLevelFuncNull_ThrowsArgumentNullException() + { + // Setup + var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); + + // Call + TestDelegate test = () => new MacroStabilityInwardsWaterStressLinesProperties(input, null); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("getNormativeAssessmentLevelFunc", exception.ParamName); + } + + [Test] public void Constructor_ValidWaternet_ExpectedValues() { // Setup var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); // Call - var properties = new MacroStabilityInwardsWaterStressLinesProperties(input); + var properties = new MacroStabilityInwardsWaterStressLinesProperties(input, GetTestNormativeAssessmentLevel); // Assert Assert.IsInstanceOf>(properties); @@ -68,7 +83,7 @@ var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); // Call - var properties = new MacroStabilityInwardsWaterStressLinesProperties(input); + var properties = new MacroStabilityInwardsWaterStressLinesProperties(input, GetTestNormativeAssessmentLevel); // Assert CollectionAssert.IsEmpty(properties.WaternetExtreme.PhreaticLines); @@ -82,7 +97,7 @@ { // Setup var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); - var properties = new MacroStabilityInwardsWaterStressLinesProperties(input); + var properties = new MacroStabilityInwardsWaterStressLinesProperties(input, GetTestNormativeAssessmentLevel); // Call string name = properties.ToString(); @@ -98,7 +113,7 @@ var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); // Call - var properties = new MacroStabilityInwardsWaterStressLinesProperties(input); + var properties = new MacroStabilityInwardsWaterStressLinesProperties(input, GetTestNormativeAssessmentLevel); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); @@ -121,5 +136,10 @@ "Eigenschappen van de waterspanningslijnen bij dagelijkse omstandigheden.", true); } + + private static RoundedDouble GetTestNormativeAssessmentLevel() + { + return (RoundedDouble) 1.1; + } } } \ No newline at end of file