Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r481507356af9b0ed7ed0de2493275a6f8c2f47ea -re440a0fe415d87b898ae1b6ad2e4ba98d0f104cf --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensionsTest.cs (.../ClosingStructuresCalculationEntityReadExtensionsTest.cs) (revision 481507356af9b0ed7ed0de2493275a6f8c2f47ea) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensionsTest.cs (.../ClosingStructuresCalculationEntityReadExtensionsTest.cs) (revision e440a0fe415d87b898ae1b6ad2e4ba98d0f104cf) @@ -51,6 +51,25 @@ } [Test] + public void Read_EntityNotReadBefore_RegisterEntity() + { + // Setup + var entity = new ClosingStructuresCalculationEntity(); + + var collector = new ReadConversionCollector(); + + // Precondition + Assert.IsFalse(collector.Contains(entity)); + + // Call + StructuresCalculation calculation = entity.Read(collector); + + // Assert + Assert.IsTrue(collector.Contains(entity)); + Assert.AreSame(calculation, collector.Get(entity)); + } + + [Test] public void Read_ValidEntity_ReturnClosingStructuresCalculation() { // Setup @@ -209,8 +228,6 @@ Assert.IsNaN(inputParameters.AreaFlowApertures.StandardDeviation); Assert.IsNaN(inputParameters.LevelCrestStructureNotClosing.Mean); Assert.IsNaN(inputParameters.LevelCrestStructureNotClosing.StandardDeviation); - - Assert.IsTrue(collector.Contains(entity)); } [Test]