Beispiel #1
0
        public void ToString_EmptyName_ReturnsDefaultName()
        {
            // Setup
            var layer = new MacroStabilityInwardsSoilLayer1D(-2.9)
            {
                Data =
                {
                    MaterialName = string.Empty
                }
            };

            var properties = new MacroStabilityInwardsSoilLayer1DProperties(layer);

            // Call
            string name = properties.ToString();

            // Assert
            Assert.AreEqual("Onbekend", name);
        }
Beispiel #2
0
        public void ToString_ValidName_ReturnsMaterialName()
        {
            // Setup
            var layer = new MacroStabilityInwardsSoilLayer1D(-2.9)
            {
                Data =
                {
                    MaterialName = "Layer A"
                }
            };

            var properties = new MacroStabilityInwardsSoilLayer1DProperties(layer);

            // Call
            string name = properties.ToString();

            // Assert
            Assert.AreEqual(layer.Data.MaterialName, name);
        }