Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -r01ff2c58c13df8f42661ae3e446dc2caaa94247e -rc312034c7478db99d3c2ef96b1c351df806e8d21 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismCreateExtensionsTest.cs (.../PipingFailureMechanismCreateExtensionsTest.cs) (revision 01ff2c58c13df8f42661ae3e446dc2caaa94247e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismCreateExtensionsTest.cs (.../PipingFailureMechanismCreateExtensionsTest.cs) (revision c312034c7478db99d3c2ef96b1c351df806e8d21) @@ -86,6 +86,26 @@ } [Test] + public void Create_StringPropertiesDoNotShareReference() + { + // Setup + const string originalComments = "Some text"; + var failureMechanism = new PipingFailureMechanism + { + Comments = originalComments + }; + var registry = new PersistenceRegistry(); + + // Call + FailureMechanismEntity entity = failureMechanism.Create(registry); + + // Assert + Assert.AreNotSame(originalComments, entity.Comments, + "To create stable binary representations/fingerprints, it's really important that strings are not shared."); + Assert.AreEqual(originalComments, entity.Comments); + } + + [Test] [TestCase(true)] [TestCase(false)] public void Create_WithStochasticSoilModels_ReturnsFailureMechanismEntityWithStochasticSoilModelEntities(bool isRelevant)