Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingCalculationScenarioCreateExtensions.cs =================================================================== diff -u -rb4e3629ea2130359117dd403af8db3c8ae0c680b -r8ba84ca6be21278d394e6763eb202dd8132db92b --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingCalculationScenarioCreateExtensions.cs (.../PipingCalculationScenarioCreateExtensions.cs) (revision b4e3629ea2130359117dd403af8db3c8ae0c680b) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/PipingCalculationScenarioCreateExtensions.cs (.../PipingCalculationScenarioCreateExtensions.cs) (revision 8ba84ca6be21278d394e6763eb202dd8132db92b) @@ -72,6 +72,10 @@ { entity.HydraulicLocationEntity = registry.Get(inputParameters.HydraulicBoundaryLocation); } + else + { + entity.AssessmentLevel = inputParameters.AssessmentLevel.Value.ToNaNAsNull(); + } if (inputParameters.StochasticSoilProfile != null) { entity.StochasticSoilProfileEntity = registry.Get(inputParameters.StochasticSoilProfile); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/PipingCalculationEntityReadExtensions.cs =================================================================== diff -u -rb4e3629ea2130359117dd403af8db3c8ae0c680b -r8ba84ca6be21278d394e6763eb202dd8132db92b --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/PipingCalculationEntityReadExtensions.cs (.../PipingCalculationEntityReadExtensions.cs) (revision b4e3629ea2130359117dd403af8db3c8ae0c680b) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/PipingCalculationEntityReadExtensions.cs (.../PipingCalculationEntityReadExtensions.cs) (revision 8ba84ca6be21278d394e6763eb202dd8132db92b) @@ -90,6 +90,10 @@ { inputParameters.HydraulicBoundaryLocation = entity.HydraulicLocationEntity.Read(collector); } + else + { + inputParameters.AssessmentLevel = (RoundedDouble) entity.AssessmentLevel.ToNullAsNaN(); + } if (entity.StochasticSoilProfileEntity != null) { inputParameters.StochasticSoilModel = entity.StochasticSoilProfileEntity.StochasticSoilModelEntity.Read(collector); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingCalculationScenarioCreateExtensionsTest.cs =================================================================== diff -u -r0dfaf04c32ddd8f2ccfe1e244bdc6efcbb3b6857 -r8ba84ca6be21278d394e6763eb202dd8132db92b --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingCalculationScenarioCreateExtensionsTest.cs (.../PipingCalculationScenarioCreateExtensionsTest.cs) (revision 0dfaf04c32ddd8f2ccfe1e244bdc6efcbb3b6857) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingCalculationScenarioCreateExtensionsTest.cs (.../PipingCalculationScenarioCreateExtensionsTest.cs) (revision 8ba84ca6be21278d394e6763eb202dd8132db92b) @@ -53,11 +53,11 @@ } [Test] - [TestCase(true, 0.0, "A", "", 2.2, 0.0, 123, 827364)] - [TestCase(false, 1.0, null, null, double.NaN, double.NaN, 980754, 231)] + [TestCase(true, 0.0, "A", "", 2.2, 0.0, 5.8, 123, 827364)] + [TestCase(false, 1.0, null, null, double.NaN, double.NaN, double.NaN, 980754, 231)] public void Create_PipingCalculationScenarioWithPropertiesSet_ReturnPipingCalculationEntity( bool isRelevant, double contribution, string name, string comments, - double exitPoint, double entryPoint, int order, int randomSeed) + double exitPoint, double entryPoint, double assessmentLevel, int order, int randomSeed) { // Setup var random = new Random(randomSeed); @@ -100,7 +100,8 @@ { Mean = (RoundedDouble) random.GetFromRange(1e-6, 9999.9999), StandardDeviation = (RoundedDouble) random.GetFromRange(1e-6, 9999.9999) - } + }, + AssessmentLevel = (RoundedDouble) assessmentLevel } }; @@ -123,6 +124,7 @@ Assert.AreEqual(input.PhreaticLevelExit.StandardDeviation.Value, entity.PhreaticLevelExitStandardDeviation); Assert.AreEqual(input.DampingFactorExit.Mean.Value, entity.DampingFactorExitMean); Assert.AreEqual(input.DampingFactorExit.StandardDeviation.Value, entity.DampingFactorExitStandardDeviation); + Assert.AreEqual(input.AssessmentLevel.Value.ToNaNAsNull(), entity.AssessmentLevel); Assert.AreEqual(order, entity.Order); Assert.AreEqual(0, entity.PipingCalculationEntityId); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs =================================================================== diff -u -rc68b62821df129218cd8d89b8b59db8c37ce3065 -r8ba84ca6be21278d394e6763eb202dd8132db92b --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision c68b62821df129218cd8d89b8b59db8c37ce3065) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 8ba84ca6be21278d394e6763eb202dd8132db92b) @@ -1327,6 +1327,7 @@ Assert.AreEqual(expectedPipingInput.Diameter70.StandardDeviation, actualPipingInput.Diameter70.StandardDeviation); Assert.AreEqual(expectedPipingInput.DarcyPermeability.Mean, actualPipingInput.DarcyPermeability.Mean); Assert.AreEqual(expectedPipingInput.DarcyPermeability.StandardDeviation, actualPipingInput.DarcyPermeability.StandardDeviation); + Assert.AreEqual(expectedPipingInput.AssessmentLevel, actualPipingInput.AssessmentLevel); } private static void AssertPipingOutput(PipingOutput expectedOutput, PipingOutput actualOutput) Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r6173a5eb258ea7b50a5f4aac71d2448db9e211c3 -r8ba84ca6be21278d394e6763eb202dd8132db92b --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingCalculationEntityReadExtensionsTest.cs (.../PipingCalculationEntityReadExtensionsTest.cs) (revision 6173a5eb258ea7b50a5f4aac71d2448db9e211c3) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingCalculationEntityReadExtensionsTest.cs (.../PipingCalculationEntityReadExtensionsTest.cs) (revision 8ba84ca6be21278d394e6763eb202dd8132db92b) @@ -52,10 +52,11 @@ } [Test] - [TestCase(true, 0.98, "haha", "hihi", 0.0, 3.4, 123)] - [TestCase(false, 0.0, null, null, double.NaN, double.NaN, 321)] + [TestCase(true, 0.98, "haha", "hihi", 0.0, 3.4, 5.8, 123)] + [TestCase(false, 0.0, null, null, double.NaN, double.NaN, double.NaN, 321)] public void Read_ValidEntity_ReturnPipingCalculationScenario(bool isRelevant, double contribution, - string name, string comments, double entryPoint, double exitPoint, int seed) + string name, string comments, double entryPoint, double exitPoint, + double assessmentLevel, int seed) { // Setup var random = new Random(seed); @@ -72,6 +73,7 @@ PhreaticLevelExitStandardDeviation = GetRandomNullableDoubleInRange(random, 0, 9999.99), DampingFactorExitMean = GetRandomNullableDoubleInRange(random, 1e-6, 9999.99), DampingFactorExitStandardDeviation = GetRandomNullableDoubleInRange(random, 0, 9999.99), + AssessmentLevel = assessmentLevel.ToNaNAsNull() }; var collector = new ReadConversionCollector(); @@ -104,6 +106,7 @@ AssertRoundedDouble(entity.PhreaticLevelExitStandardDeviation, calculation.InputParameters.PhreaticLevelExit.StandardDeviation); AssertRoundedDouble(entity.DampingFactorExitMean, calculation.InputParameters.DampingFactorExit.Mean); AssertRoundedDouble(entity.DampingFactorExitStandardDeviation, calculation.InputParameters.DampingFactorExit.StandardDeviation); + Assert.AreEqual(entity.AssessmentLevel.ToNullAsNaN(), calculation.InputParameters.AssessmentLevel.Value); Assert.IsNull(calculation.InputParameters.SurfaceLine); Assert.IsNull(calculation.InputParameters.HydraulicBoundaryLocation); @@ -189,6 +192,7 @@ EntryPointL = 1, ExitPointL = 2, DampingFactorExitMean = 1, + AssessmentLevel = 5.81 }; var collector = new ReadConversionCollector(); @@ -199,6 +203,7 @@ // Assert Assert.AreSame(hydraulicBoundaryLocation, calculation.InputParameters.HydraulicBoundaryLocation); + Assert.AreEqual(hydraulicBoundaryLocation.DesignWaterLevel, calculation.InputParameters.AssessmentLevel); } [Test]