Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r00e2b17f81b30dfe4b71e3535424256d7cd02895 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineTest.cs) (revision 00e2b17f81b30dfe4b71e3535424256d7cd02895) @@ -31,22 +31,37 @@ public class MacroStabilityInwardsSoilProfileUnderSurfaceLineTest { [Test] - public void Constructor_LayersNull_ThrowsArgumentNullException() + public void Constructor_NameNull_ThrowsArgumentNullException() { // Call TestDelegate test = () => new MacroStabilityInwardsSoilProfileUnderSurfaceLine(null, + Enumerable.Empty(), Enumerable.Empty()); // Assert var exception = Assert.Throws(test); + Assert.AreEqual("name", exception.ParamName); + } + + [Test] + public void Constructor_LayersNull_ThrowsArgumentNullException() + { + // Call + TestDelegate test = () => new MacroStabilityInwardsSoilProfileUnderSurfaceLine("name", + null, + Enumerable.Empty()); + + // Assert + var exception = Assert.Throws(test); Assert.AreEqual("layers", exception.ParamName); } [Test] public void Constructor_PreconsolidationStressesNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new MacroStabilityInwardsSoilProfileUnderSurfaceLine(Enumerable.Empty(), + TestDelegate call = () => new MacroStabilityInwardsSoilProfileUnderSurfaceLine("name", + Enumerable.Empty(), null); // Assert @@ -58,14 +73,16 @@ public void Constructor_WithValidParameters_NewInstanceWithPropertiesSet() { // Call + const string name = "Profile Name"; IEnumerable layers = Enumerable.Empty(); IEnumerable preconsolidationStresses = Enumerable.Empty(); // Setup - var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(layers, preconsolidationStresses); + var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(name, layers, preconsolidationStresses); // Assert + Assert.AreEqual(name, profile.Name); Assert.AreSame(layers, profile.Layers); Assert.AreSame(preconsolidationStresses, profile.PreconsolidationStresses); }