Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilProfileTest.cs =================================================================== diff -u -rbf334f50530164badedba45a78f3aab857ae1bf6 -r8832cfacbfb0a999d9dd5ddcb93fd81bdb2fb09f --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilProfileTest.cs (.../StochasticSoilProfileTest.cs) (revision bf334f50530164badedba45a78f3aab857ae1bf6) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilProfileTest.cs (.../StochasticSoilProfileTest.cs) (revision 8832cfacbfb0a999d9dd5ddcb93fd81bdb2fb09f) @@ -20,7 +20,6 @@ // All rights reserved. using NUnit.Framework; - using Ringtoets.Piping.Primitives; namespace Ringtoets.Piping.Data.Test @@ -42,5 +41,24 @@ Assert.AreEqual(soilProfileType, stochasticSoilProfileProbability.SoilProfileType); Assert.AreEqual(soilProfileId, stochasticSoilProfileProbability.SoilProfileId); } + + [Test] + [TestCase(null)] + [TestCase("")] + [TestCase("some name")] + public void ToString_WithName_ReturnsName(string name) + { + // Setup + var stochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) + { + SoilProfile = new PipingSoilProfile(name, 0.0, new[] + { + new PipingSoilLayer(0.0) + }, SoilProfileType.SoilProfile1D, 0) + }; + + // Call & Assert + Assert.AreEqual(name, stochasticSoilProfile.ToString()); + } } } \ No newline at end of file