Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilProfileTest.cs =================================================================== diff -u -r2711ea7d788b8f6193cf6c090317a6d24d891d4b -r29acdef1f06e3be94d7fd8a94731e391b5d97ae8 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilProfileTest.cs (.../StochasticSoilProfileTest.cs) (revision 2711ea7d788b8f6193cf6c090317a6d24d891d4b) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/StochasticSoilProfileTest.cs (.../StochasticSoilProfileTest.cs) (revision 29acdef1f06e3be94d7fd8a94731e391b5d97ae8) @@ -31,6 +31,8 @@ [TestFixture] public class StochasticSoilProfileTest { + private static readonly Random profileIdRandom = new Random(32); + [Test] [TestCase(0.1, SoilProfileType.SoilProfile1D, 123L)] [TestCase(0.26, SoilProfileType.SoilProfile2D, 123L)] @@ -237,6 +239,8 @@ StochasticSoilProfile profileA = CreateRandomStochasticProfile(21); StochasticSoilProfile profileB = CreateRandomStochasticProfile(21); StochasticSoilProfile profileC = CreateRandomStochasticProfile(73); + StochasticSoilProfile profileE = new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 25); + StochasticSoilProfile profileF = new StochasticSoilProfile(0.5, SoilProfileType.SoilProfile1D, 45); return new[] { @@ -247,14 +251,18 @@ new TestCaseData(profileB, profileC, false) { TestName = "Equals_ProfileBProfileC_False" + }, + new TestCaseData(profileE, profileF, true) + { + TestName = "Equals_DifferentIds_True" } }; } private static StochasticSoilProfile CreateRandomStochasticProfile(int randomSeed) { var random = new Random(randomSeed); - return new StochasticSoilProfile(random.NextDouble(), SoilProfileType.SoilProfile1D, random.Next()) + return new StochasticSoilProfile(random.NextDouble(), SoilProfileType.SoilProfile1D, profileIdRandom.Next()) { SoilProfile = CreateRandomProfile(random) };