Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HydraulicBoundaryLocationCreateExtensionsTest.cs =================================================================== diff -u -r37aadd6a7b1a13ef1c8809b3479df0911c6632bb -rc312034c7478db99d3c2ef96b1c351df806e8d21 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HydraulicBoundaryLocationCreateExtensionsTest.cs (.../HydraulicBoundaryLocationCreateExtensionsTest.cs) (revision 37aadd6a7b1a13ef1c8809b3479df0911c6632bb) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HydraulicBoundaryLocationCreateExtensionsTest.cs (.../HydraulicBoundaryLocationCreateExtensionsTest.cs) (revision c312034c7478db99d3c2ef96b1c351df806e8d21) @@ -73,6 +73,24 @@ } [Test] + public void Create_StringPropertiesDoNotShareReferences() + { + // Setup + var testName = "original name"; + var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, testName, 0, 0); + var registry = new PersistenceRegistry(); + + // Call + HydraulicLocationEntity entity = hydraulicBoundaryLocation.Create(registry, 0); + + // Assert + Assert.IsNotNull(entity); + 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); + } + + [Test] public void Create_WithPersistenceRegistryAndDesignWaterLevel_ReturnsHydraulicBoundaryLocationEntityWithDesignWaterLevelSet() { // Setup