Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructureEntityReadExtensionsTest.cs =================================================================== diff -u -rcecb97ce5adb57cec9f89b557d6fafce09c9ed65 -re440a0fe415d87b898ae1b6ad2e4ba98d0f104cf --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructureEntityReadExtensionsTest.cs (.../HeightStructureEntityReadExtensionsTest.cs) (revision cecb97ce5adb57cec9f89b557d6fafce09c9ed65) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructureEntityReadExtensionsTest.cs (.../HeightStructureEntityReadExtensionsTest.cs) (revision e440a0fe415d87b898ae1b6ad2e4ba98d0f104cf) @@ -47,6 +47,29 @@ } [Test] + public void Read_EntityNotReadBefore_RegisterEntity() + { + // Setup + var entity = new HeightStructureEntity + { + Name = "name", + Id = "id" + }; + + var collector = new ReadConversionCollector(); + + // Precondition + Assert.IsFalse(collector.Contains(entity)); + + // Call + HeightStructure calculation = entity.Read(collector); + + // Assert + Assert.IsTrue(collector.Contains(entity)); + Assert.AreSame(calculation, collector.Get(entity)); + } + + [Test] public void Read_ValidEntity_ReturnHeightStructure() { // Setup @@ -97,8 +120,6 @@ Assert.AreEqual(entity.StorageStructureAreaCoefficientOfVariation, structure.StorageStructureArea.CoefficientOfVariation.Value); Assert.AreEqual(entity.AllowedLevelIncreaseStorageMean, structure.AllowedLevelIncreaseStorage.Mean.Value); Assert.AreEqual(entity.AllowedLevelIncreaseStorageStandardDeviation, structure.AllowedLevelIncreaseStorage.StandardDeviation.Value); - - Assert.IsTrue(collector.Contains(entity)); } [Test]