Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -r6917c98a7820943d62df19669a6551bb76bbf851 -rc312034c7478db99d3c2ef96b1c351df806e8d21 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs) (revision 6917c98a7820943d62df19669a6551bb76bbf851) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs) (revision c312034c7478db99d3c2ef96b1c351df806e8d21) @@ -85,6 +85,26 @@ } [Test] + public void Create_StringPropertiesDoNotShareReference() + { + // Setup + const string originalComments = "Some text"; + var failureMechanism = new GrassCoverErosionInwardsFailureMechanism + { + 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] public void Create_WithoutSections_EmptyFailureMechanismSectionEntities() { // Setup