Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -r01ff2c58c13df8f42661ae3e446dc2caaa94247e -rc312034c7478db99d3c2ef96b1c351df806e8d21 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismCreateExtensionsTest.cs (.../WaterPressureAsphaltCoverFailureMechanismCreateExtensionsTest.cs) (revision 01ff2c58c13df8f42661ae3e446dc2caaa94247e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismCreateExtensionsTest.cs (.../WaterPressureAsphaltCoverFailureMechanismCreateExtensionsTest.cs) (revision c312034c7478db99d3c2ef96b1c351df806e8d21) @@ -74,6 +74,26 @@ } [Test] + public void Create_StringPropertiesDoNotShareReference() + { + // Setup + const string originalComments = "Some text"; + var failureMechanism = new WaterPressureAsphaltCoverFailureMechanism + { + 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