Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DBasePropertiesTest.cs =================================================================== diff -u -reb6d3b69267f3ae2870b25679793bbc0099338cd -rd7eb93d1ab39297383c7ac7389513ef8f27982b1 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DBasePropertiesTest.cs (.../MacroStabilityInwardsSoilLayer2DBasePropertiesTest.cs) (revision eb6d3b69267f3ae2870b25679793bbc0099338cd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsSoilLayer2DBasePropertiesTest.cs (.../MacroStabilityInwardsSoilLayer2DBasePropertiesTest.cs) (revision d7eb93d1ab39297383c7ac7389513ef8f27982b1) @@ -96,10 +96,24 @@ } [Test] - public void ToString_Always_ReturnsMaterialName() + public void GetProperties_WithDataEmptyName_ReturnExpectedValues() { // Setup MacroStabilityInwardsSoilLayer2D layer = MacroStabilityInwardsSoilLayer2DTestFactory.CreateMacroStabilityInwardsSoilLayer2D(); + layer.Data.MaterialName = string.Empty; + + // Call + var properties = new MacroStabilityInwardsSoilLayer2DBaseProperties(layer); + + // Assert + Assert.AreEqual("Onbekend", properties.Name); + } + + [Test] + public void ToString_ValidName_ReturnsMaterialName() + { + // Setup + MacroStabilityInwardsSoilLayer2D layer = MacroStabilityInwardsSoilLayer2DTestFactory.CreateMacroStabilityInwardsSoilLayer2D(); layer.Data.MaterialName = "Layer A 2D"; var properties = new MacroStabilityInwardsSoilLayer2DBaseProperties(layer); @@ -112,6 +126,22 @@ } [Test] + public void ToString_EmptyName_ReturnsDefaultName() + { + // Setup + MacroStabilityInwardsSoilLayer2D layer = MacroStabilityInwardsSoilLayer2DTestFactory.CreateMacroStabilityInwardsSoilLayer2D(); + layer.Data.MaterialName = string.Empty; + + var properties = new MacroStabilityInwardsSoilLayer2DBaseProperties(layer); + + // Call + string name = properties.ToString(); + + // Assert + Assert.AreEqual("Onbekend", name); + } + + [Test] public void Constructor_ValidData_PropertieshaveExpectedAttributeValues() { // Setup