Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs =================================================================== diff -u -r508d720230c5f63bce7f95bddc3b7a04808d267d -rc312034c7478db99d3c2ef96b1c351df806e8d21 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs (.../AssessmentSectionCreateExtensionsTest.cs) (revision 508d720230c5f63bce7f95bddc3b7a04808d267d) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/AssessmentSectionCreateExtensionsTest.cs (.../AssessmentSectionCreateExtensionsTest.cs) (revision c312034c7478db99d3c2ef96b1c351df806e8d21) @@ -114,6 +114,34 @@ } [Test] + public void Create_StringPropertiesDoNotShareReference() + { + // Setup + const string originalName = "name"; + const string originalComments = "comments"; + + var section = new AssessmentSection(AssessmentSectionComposition.Dike) + { + Name = originalName, + Comments = originalComments + }; + + var registry = new PersistenceRegistry(); + + // Call + AssessmentSectionEntity entity = section.Create(registry); + + // Assert + Assert.AreNotSame(originalName, entity.Name, + "To create stable binary representations/fingerprints, it's really important that strings are not shared."); + Assert.AreNotSame(originalComments, entity.Comments, + "To create stable binary representations/fingerprints, it's really important that strings are not shared."); + + Assert.AreEqual(originalName, entity.Name); + Assert.AreEqual(originalComments, entity.Comments); + } + + [Test] public void Create_WithHydraulicBoundaryDatabase_SetsPropertiesAndLocationsToEntity() { // Setup