Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/StochasticSoilModelCreateExtensionsTest.cs =================================================================== diff -u -r37aadd6a7b1a13ef1c8809b3479df0911c6632bb -rc312034c7478db99d3c2ef96b1c351df806e8d21 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/StochasticSoilModelCreateExtensionsTest.cs (.../StochasticSoilModelCreateExtensionsTest.cs) (revision 37aadd6a7b1a13ef1c8809b3479df0911c6632bb) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/StochasticSoilModelCreateExtensionsTest.cs (.../StochasticSoilModelCreateExtensionsTest.cs) (revision c312034c7478db99d3c2ef96b1c351df806e8d21) @@ -73,9 +73,31 @@ Assert.AreEqual(testSegmentName, entity.SegmentName); Assert.AreEqual(order, entity.Order); Assert.IsEmpty(entity.StochasticSoilProfileEntities); - } + } [Test] + public void Create_StringPropertiesDoNotShareReference() + { + // Setup + string testName = "testName"; + string testSegmentName = "testSegmentName"; + var stochasticSoilModel = new StochasticSoilModel(-1, testName, testSegmentName); + var registry = new PersistenceRegistry(); + + // Call + StochasticSoilModelEntity entity = stochasticSoilModel.Create(registry, 0); + + // Assert + Assert.AreNotSame(testName, entity.Name, + "To create stable binary representations/fingerprints, it's really important that strings are not shared."); + Assert.AreEqual(testName, entity.Name); + + Assert.AreNotSame(testSegmentName, entity.SegmentName, + "To create stable binary representations/fingerprints, it's really important that strings are not shared."); + Assert.AreEqual(testSegmentName, entity.SegmentName); + } + + [Test] public void Create_WithStochasticSoilProfiles_ReturnsStochasticSoilModelEntityWithPropertiesAndStochasticSoilProfileEntitiesSet() { // Setup