Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/RingtoetsPipingSurfaceLineCreateExtensionsTest.cs =================================================================== diff -u -rd65d6b037600ccd69f386d9164172dd2c133356e -r6a9a423fddb189769e43cc9d69d4dd828a6f68e2 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/RingtoetsPipingSurfaceLineCreateExtensionsTest.cs (.../RingtoetsPipingSurfaceLineCreateExtensionsTest.cs) (revision d65d6b037600ccd69f386d9164172dd2c133356e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/RingtoetsPipingSurfaceLineCreateExtensionsTest.cs (.../RingtoetsPipingSurfaceLineCreateExtensionsTest.cs) (revision 6a9a423fddb189769e43cc9d69d4dd828a6f68e2) @@ -274,13 +274,29 @@ }; // Call - SurfaceLineEntity entity = surfaceLine.Create(registry); + surfaceLine.Create(registry); // Assert - const long entityId = 125673543; - entity.SurfaceLineEntityId = entityId; - registry.TransferIds(); - Assert.AreEqual(entityId, surfaceLine.StorageId); + Assert.IsTrue(registry.Contains(surfaceLine)); } + + [Test] + public void Create_CreatingEntityForSameSurfaceLine_ReturnSamenEntity() + { + // Setup + var surfaceLine = new RingtoetsPipingSurfaceLine + { + ReferenceLineIntersectionWorldPoint = new Point2D(1.1, 2.2) + }; + + var registry = new PersistenceRegistry(); + + // Call + SurfaceLineEntity entity1 = surfaceLine.Create(registry); + SurfaceLineEntity entity2 = surfaceLine.Create(registry); + + // Assert + Assert.AreSame(entity1, entity2); + } } } \ No newline at end of file