private static void ReadInputParameters(ClosingStructuresInput inputParameters,
                                                ClosingStructuresCalculationEntity entity,
                                                ReadConversionCollector collector)
        {
            if (entity.ClosingStructureEntity != null)
            {
                inputParameters.Structure = entity.ClosingStructureEntity.Read(collector);
            }

            entity.Read(inputParameters, collector);

            inputParameters.InflowModelType       = (ClosingStructureInflowModelType)entity.InflowModelType;
            inputParameters.InsideWaterLevel.Mean = (RoundedDouble)entity.InsideWaterLevelMean.ToNullAsNaN();
            inputParameters.InsideWaterLevel.StandardDeviation = (RoundedDouble)entity.InsideWaterLevelStandardDeviation.ToNullAsNaN();
            inputParameters.DeviationWaveDirection             = (RoundedDouble)entity.DeviationWaveDirection.ToNullAsNaN();
            inputParameters.ModelFactorSuperCriticalFlow.Mean  = (RoundedDouble)entity.ModelFactorSuperCriticalFlowMean.ToNullAsNaN();
            inputParameters.DrainCoefficient.Mean = (RoundedDouble)entity.DrainCoefficientMean.ToNullAsNaN();
            inputParameters.DrainCoefficient.StandardDeviation        = (RoundedDouble)entity.DrainCoefficientStandardDeviation.ToNullAsNaN();
            inputParameters.FactorStormDurationOpenStructure          = (RoundedDouble)entity.FactorStormDurationOpenStructure.ToNullAsNaN();
            inputParameters.ThresholdHeightOpenWeir.Mean              = (RoundedDouble)entity.ThresholdHeightOpenWeirMean.ToNullAsNaN();
            inputParameters.ThresholdHeightOpenWeir.StandardDeviation = (RoundedDouble)entity.ThresholdHeightOpenWeirStandardDeviation.ToNullAsNaN();
            inputParameters.AreaFlowApertures.Mean = (RoundedDouble)entity.AreaFlowAperturesMean.ToNullAsNaN();
            inputParameters.AreaFlowApertures.StandardDeviation = (RoundedDouble)entity.AreaFlowAperturesStandardDeviation.ToNullAsNaN();
            inputParameters.FailureProbabilityOpenStructure     = entity.FailureProbabilityOpenStructure;
            inputParameters.FailureProbabilityReparation        = entity.FailureProbabilityReparation;
            inputParameters.IdenticalApertures = entity.IdenticalApertures;
            inputParameters.LevelCrestStructureNotClosing.Mean = (RoundedDouble)entity.LevelCrestStructureNotClosingMean.ToNullAsNaN();
            inputParameters.LevelCrestStructureNotClosing.StandardDeviation = (RoundedDouble)entity.LevelCrestStructureNotClosingStandardDeviation.ToNullAsNaN();
            inputParameters.ProbabilityOpenStructureBeforeFlooding          = entity.ProbabilityOpenStructureBeforeFlooding;
        }
예제 #2
0
        public void Create_GroupWithChildClosingStructuresCalculationsAndChildCalculationGroups_CreateEntities()
        {
            // Setup
            var group = new CalculationGroup
            {
                Children =
                {
                    new CalculationGroup
                    {
                        Name = "A"
                    },
                    new StructuresCalculationScenario <ClosingStructuresInput>
                    {
                        Name = "B"
                    },
                    new CalculationGroup
                    {
                        Name = "C"
                    },
                    new StructuresCalculationScenario <ClosingStructuresInput>
                    {
                        Name = "D"
                    }
                }
            };

            var registry = new PersistenceRegistry();

            // Call
            CalculationGroupEntity entity = group.Create(registry, 0);

            // Assert
            CalculationGroupEntity[]             childGroupEntities       = entity.CalculationGroupEntity1.ToArray();
            ClosingStructuresCalculationEntity[] childCalculationEntities = entity.ClosingStructuresCalculationEntities.ToArray();
            Assert.AreEqual(2, childGroupEntities.Length);
            Assert.AreEqual(2, childCalculationEntities.Length);

            CalculationGroupEntity childEntity1 = childGroupEntities[0];

            Assert.AreEqual("A", childEntity1.Name);
            Assert.AreEqual(0, childEntity1.Order);
            CollectionAssert.IsEmpty(childEntity1.CalculationGroupEntity1);

            ClosingStructuresCalculationEntity childEntity2 = childCalculationEntities[0];

            Assert.AreEqual("B", childEntity2.Name);
            Assert.AreEqual(1, childEntity2.Order);

            CalculationGroupEntity childEntity3 = childGroupEntities[1];

            Assert.AreEqual("C", childEntity3.Name);
            Assert.AreEqual(2, childEntity3.Order);
            CollectionAssert.IsEmpty(childEntity3.CalculationGroupEntity1);

            ClosingStructuresCalculationEntity childEntity4 = childCalculationEntities[1];

            Assert.AreEqual("D", childEntity4.Name);
            Assert.AreEqual(3, childEntity4.Order);
        }
예제 #3
0
 private static void SetClosingStructuresOutputEntity(StructuresCalculation <ClosingStructuresInput> calculation,
                                                      ClosingStructuresCalculationEntity entity)
 {
     if (calculation.HasOutput)
     {
         entity.ClosingStructuresOutputEntities.Add(calculation
                                                    .Output
                                                    .Create <ClosingStructuresOutputEntity>());
     }
 }
예제 #4
0
        public void Read_ReadConversionCollectorNull_ThrowArgumentNullException()
        {
            // Setup
            var entity = new ClosingStructuresCalculationEntity();

            // Call
            void Call() => entity.Read(null);

            // Assert
            string paramName = Assert.Throws <ArgumentNullException>(Call).ParamName;

            Assert.AreEqual("collector", paramName);
        }
        private static void ReadOutput(StructuresCalculation <ClosingStructuresInput> calculation,
                                       ClosingStructuresCalculationEntity entity)
        {
            ClosingStructuresOutputEntity outputEntity = entity.ClosingStructuresOutputEntities.SingleOrDefault();

            if (outputEntity == null)
            {
                return;
            }

            var output = new StructuresOutput(outputEntity.Reliability.ToNullAsNaN(),
                                              outputEntity.GeneralResultFaultTreeIllustrationPointEntity?.Read());

            calculation.Output = output;
        }
예제 #6
0
        public void Create_WithCalculationGroup_ReturnFailureMechanismEntityWithCalculationGroupEntities()
        {
            // Setup
            StructuresCalculationScenario <ClosingStructuresInput> calculation = new TestClosingStructuresCalculationScenario();

            calculation.InputParameters.Structure = null;
            calculation.InputParameters.HydraulicBoundaryLocation = null;

            var failureMechanism = new ClosingStructuresFailureMechanism();

            failureMechanism.CalculationsGroup.Children.Add(new CalculationGroup
            {
                Name = "A"
            });
            failureMechanism.CalculationsGroup.Children.Add(calculation);

            var registry = new PersistenceRegistry();

            // Call
            FailureMechanismEntity entity = failureMechanism.Create(registry);

            // Assert
            Assert.IsNotNull(entity);
            Assert.AreEqual(failureMechanism.CalculationsGroup.Name, entity.CalculationGroupEntity.Name);
            Assert.AreEqual(0, entity.CalculationGroupEntity.Order);

            CalculationGroupEntity[] childGroupEntities = entity.CalculationGroupEntity.CalculationGroupEntity1
                                                          .OrderBy(cge => cge.Order)
                                                          .ToArray();
            Assert.AreEqual(1, childGroupEntities.Length);
            CalculationGroupEntity childGroupEntity = childGroupEntities[0];

            Assert.AreEqual("A", childGroupEntity.Name);
            Assert.AreEqual(0, childGroupEntity.Order);

            ClosingStructuresCalculationEntity[] calculationEntities = entity.CalculationGroupEntity.ClosingStructuresCalculationEntities
                                                                       .OrderBy(ce => ce.Order)
                                                                       .ToArray();
            ClosingStructuresCalculationEntity calculationEntity = calculationEntities[0];

            Assert.AreEqual("Nieuwe berekening", calculationEntity.Name);
            Assert.AreEqual(1, calculationEntity.Order);
        }
예제 #7
0
        private static void SetClosingStructuresInputValues(ClosingStructuresCalculationEntity entity, ClosingStructuresInput input,
                                                            PersistenceRegistry registry)
        {
            input.Create(entity, registry);

            if (input.Structure != null)
            {
                entity.ClosingStructureEntity = registry.Get(input.Structure);
            }

            entity.InflowModelType = Convert.ToByte(input.InflowModelType);

            entity.InsideWaterLevelMean = input.InsideWaterLevel.Mean.ToNaNAsNull();
            entity.InsideWaterLevelStandardDeviation = input.InsideWaterLevel.StandardDeviation.ToNaNAsNull();

            entity.DeviationWaveDirection = input.DeviationWaveDirection.ToNaNAsNull();

            entity.ModelFactorSuperCriticalFlowMean = input.ModelFactorSuperCriticalFlow.Mean.ToNaNAsNull();

            entity.DrainCoefficientMean = input.DrainCoefficient.Mean.ToNaNAsNull();
            entity.DrainCoefficientStandardDeviation = input.DrainCoefficient.StandardDeviation.ToNaNAsNull();

            entity.FactorStormDurationOpenStructure = input.FactorStormDurationOpenStructure.ToNaNAsNull();

            entity.ThresholdHeightOpenWeirMean = input.ThresholdHeightOpenWeir.Mean.ToNaNAsNull();
            entity.ThresholdHeightOpenWeirStandardDeviation = input.ThresholdHeightOpenWeir.StandardDeviation.ToNaNAsNull();

            entity.AreaFlowAperturesMean = input.AreaFlowApertures.Mean.ToNaNAsNull();
            entity.AreaFlowAperturesStandardDeviation = input.AreaFlowApertures.StandardDeviation.ToNaNAsNull();

            entity.FailureProbabilityOpenStructure = input.FailureProbabilityOpenStructure;

            entity.FailureProbabilityReparation = input.FailureProbabilityReparation;

            entity.IdenticalApertures = input.IdenticalApertures;

            entity.LevelCrestStructureNotClosingMean = input.LevelCrestStructureNotClosing.Mean.ToNaNAsNull();
            entity.LevelCrestStructureNotClosingStandardDeviation = input.LevelCrestStructureNotClosing.StandardDeviation.ToNaNAsNull();

            entity.ProbabilityOpenStructureBeforeFlooding = input.ProbabilityOpenStructureBeforeFlooding;
        }
예제 #8
0
        public void Read_EntityWithStructureEntity_ReturnCalculationWithStructure()
        {
            // Setup
            ClosingStructure structure = new TestClosingStructure();
            var structureEntity        = new ClosingStructureEntity();
            var entity = new ClosingStructuresCalculationEntity
            {
                ClosingStructureEntity = structureEntity,
                IdenticalApertures     = 1,
                ScenarioContribution   = 0
            };
            var collector = new ReadConversionCollector();

            collector.Read(structureEntity, structure);

            // Call
            StructuresCalculationScenario <ClosingStructuresInput> calculation = entity.Read(collector);

            // Assert
            Assert.AreSame(structure, calculation.InputParameters.Structure);
        }
예제 #9
0
        public void Read_EntityWithForeshoreProfileEntity_ReturnCalculationWithForeshoreProfile()
        {
            // Setup
            var profile       = new TestForeshoreProfile();
            var profileEntity = new ForeshoreProfileEntity();
            var entity        = new ClosingStructuresCalculationEntity
            {
                ForeshoreProfileEntity = profileEntity,
                IdenticalApertures     = 1,
                ScenarioContribution   = 0
            };

            var collector = new ReadConversionCollector();

            collector.Read(profileEntity, profile);

            // Call
            StructuresCalculationScenario <ClosingStructuresInput> calculation = entity.Read(collector);

            // Assert
            Assert.AreSame(profile, calculation.InputParameters.ForeshoreProfile);
        }
예제 #10
0
        public void Read_EntityWithHydraulicLocationEntity_ReturnCalculationWithHydraulicBoundaryLocation()
        {
            // Setup
            var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "A", 2, 3);
            var hydraulicLocationEntity   = new HydraulicLocationEntity();
            var entity = new ClosingStructuresCalculationEntity
            {
                HydraulicLocationEntity = hydraulicLocationEntity,
                IdenticalApertures      = 1,
                ScenarioContribution    = 0
            };

            var collector = new ReadConversionCollector();

            collector.Read(hydraulicLocationEntity, hydraulicBoundaryLocation);

            // Call
            StructuresCalculationScenario <ClosingStructuresInput> calculation = entity.Read(collector);

            // Assert
            Assert.AreSame(hydraulicBoundaryLocation, calculation.InputParameters.HydraulicBoundaryLocation);
        }
예제 #11
0
        /// <summary>
        /// Creates a <see cref="ClosingStructuresCalculationEntity"/> based
        /// on the information of the <see cref="StructuresCalculationScenario{T}"/>.
        /// </summary>
        /// <param name="calculation">The calculation to create a database entity for.</param>
        /// <param name="registry">The object keeping track of create operations.</param>
        /// <param name="order">The index at where <paramref name="calculation"/> resides
        /// in its parent container.</param>
        /// <returns>A new <see cref="ClosingStructuresCalculationEntity"/>.</returns>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="registry"/> is <c>null</c>.</exception>
        internal static ClosingStructuresCalculationEntity CreateForClosingStructures(this StructuresCalculationScenario <ClosingStructuresInput> calculation,
                                                                                      PersistenceRegistry registry, int order)
        {
            if (registry == null)
            {
                throw new ArgumentNullException(nameof(registry));
            }

            var entity = new ClosingStructuresCalculationEntity
            {
                Name = calculation.Name.DeepClone(),
                RelevantForScenario  = Convert.ToByte(calculation.IsRelevant),
                ScenarioContribution = calculation.Contribution,
                Comments             = calculation.Comments.Body.DeepClone(),
                Order = order
            };

            SetClosingStructuresInputValues(entity, calculation.InputParameters, registry);
            SetClosingStructuresOutputEntity(calculation, entity);

            return(entity);
        }
        /// <summary>
        /// Reads the <see cref="ClosingStructuresCalculationEntity"/> and use the
        /// information to update a <see cref="StructuresCalculationScenario{T}"/>.
        /// </summary>
        /// <param name="entity">The <see cref="ClosingStructuresCalculationEntity"/>
        /// to create <see cref="StructuresCalculationScenario{T}"/> for.</param>
        /// <param name="collector">The object keeping track of read operations.</param>
        /// <returns>A new <see cref="StructuresCalculationScenario{T}"/>.</returns>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="collector"/> is <c>null</c>.</exception>
        internal static StructuresCalculationScenario <ClosingStructuresInput> Read(this ClosingStructuresCalculationEntity entity,
                                                                                    ReadConversionCollector collector)
        {
            if (collector == null)
            {
                throw new ArgumentNullException(nameof(collector));
            }

            var calculation = new StructuresCalculationScenario <ClosingStructuresInput>
            {
                Name         = entity.Name,
                IsRelevant   = Convert.ToBoolean(entity.RelevantForScenario),
                Contribution = (RoundedDouble)entity.ScenarioContribution,
                Comments     =
                {
                    Body = entity.Comments
                }
            };

            ReadInputParameters(calculation.InputParameters, entity, collector);
            ReadOutput(calculation, entity);

            return(calculation);
        }
예제 #13
0
        public void Read_ValidEntityWithOutputEntity_ReturnCalculationWithOutput()
        {
            // Setup
            var entity = new ClosingStructuresCalculationEntity
            {
                ClosingStructuresOutputEntities =
                {
                    new ClosingStructuresOutputEntity()
                },
                IdenticalApertures   = 1,
                ScenarioContribution = 0
            };

            var collector = new ReadConversionCollector();

            // Call
            StructuresCalculationScenario <ClosingStructuresInput> calculation = entity.Read(collector);

            // Assert
            StructuresOutput calculationOutput = calculation.Output;

            Assert.IsNaN(calculationOutput.Reliability);
            Assert.IsFalse(calculationOutput.HasGeneralResult);
        }
예제 #14
0
        public void Read_ValidEntity_ReturnClosingStructuresCalculation()
        {
            // Setup
            var entity = new ClosingStructuresCalculationEntity
            {
                Name = "name",
                RelevantForScenario                                = Convert.ToByte(true),
                ScenarioContribution                               = 0.0,
                Comments                                           = "comments",
                StructureNormalOrientation                         = 1.1,
                ModelFactorSuperCriticalFlowMean                   = 2.2,
                AllowedLevelIncreaseStorageMean                    = 3.3,
                AllowedLevelIncreaseStorageStandardDeviation       = 4.4,
                StorageStructureAreaMean                           = 5.5,
                StorageStructureAreaCoefficientOfVariation         = 6.6,
                FlowWidthAtBottomProtectionMean                    = 7.7,
                FlowWidthAtBottomProtectionStandardDeviation       = 8.8,
                CriticalOvertoppingDischargeMean                   = 9.9,
                CriticalOvertoppingDischargeCoefficientOfVariation = 10.10,
                FailureProbabilityStructureWithErosion             = 0.11,
                WidthFlowAperturesMean                             = 12.12,
                WidthFlowAperturesStandardDeviation                = 13.13,
                StormDurationMean                                  = 14.14,
                UseBreakWater                                      = Convert.ToByte(true),
                BreakWaterType                                     = Convert.ToByte(BreakWaterType.Wall),
                BreakWaterHeight                                   = 15.15,
                UseForeshore                                       = Convert.ToByte(true),
                InflowModelType                                    = Convert.ToByte(ClosingStructureInflowModelType.LowSill),
                InsideWaterLevelMean                               = 16.16,
                InsideWaterLevelStandardDeviation                  = 17.17,
                DeviationWaveDirection                             = 18.18,
                DrainCoefficientMean                               = 19.19,
                DrainCoefficientStandardDeviation                  = 20.20,
                FactorStormDurationOpenStructure                   = 21.21,
                ThresholdHeightOpenWeirMean                        = 22.22,
                ThresholdHeightOpenWeirStandardDeviation           = 23.23,
                AreaFlowAperturesMean                              = 24.24,
                AreaFlowAperturesStandardDeviation                 = 25.25,
                FailureProbabilityOpenStructure                    = 0.26,
                FailureProbabilityReparation                       = 0.27,
                IdenticalApertures                                 = 28,
                LevelCrestStructureNotClosingMean                  = 29.29,
                LevelCrestStructureNotClosingStandardDeviation     = 30.30,
                ProbabilityOpenStructureBeforeFlooding             = 0.31
            };
            var collector = new ReadConversionCollector();

            // Call
            StructuresCalculationScenario <ClosingStructuresInput> calculation = entity.Read(collector);

            // Assert
            Assert.AreEqual(entity.Name, calculation.Name);
            Assert.AreEqual(Convert.ToBoolean(entity.RelevantForScenario), calculation.IsRelevant);
            RoundedDoubleTestHelper.AssertRoundedDouble(entity.ScenarioContribution, calculation.Contribution);
            Assert.AreEqual(entity.Comments, calculation.Comments.Body);

            ClosingStructuresInput inputParameters = calculation.InputParameters;

            Assert.IsNull(inputParameters.ForeshoreProfile);
            Assert.IsNull(inputParameters.Structure);
            Assert.IsNull(inputParameters.HydraulicBoundaryLocation);
            Assert.AreEqual(entity.StructureNormalOrientation, inputParameters.StructureNormalOrientation.Value);
            Assert.AreEqual(entity.ModelFactorSuperCriticalFlowMean, inputParameters.ModelFactorSuperCriticalFlow.Mean.Value);
            Assert.AreEqual(entity.AllowedLevelIncreaseStorageMean, inputParameters.AllowedLevelIncreaseStorage.Mean.Value);
            Assert.AreEqual(entity.AllowedLevelIncreaseStorageStandardDeviation, inputParameters.AllowedLevelIncreaseStorage.StandardDeviation.Value);
            Assert.AreEqual(entity.StorageStructureAreaMean, inputParameters.StorageStructureArea.Mean.Value);
            Assert.AreEqual(entity.StorageStructureAreaCoefficientOfVariation, inputParameters.StorageStructureArea.CoefficientOfVariation.Value);
            Assert.AreEqual(entity.FlowWidthAtBottomProtectionMean, inputParameters.FlowWidthAtBottomProtection.Mean.Value);
            Assert.AreEqual(entity.FlowWidthAtBottomProtectionStandardDeviation, inputParameters.FlowWidthAtBottomProtection.StandardDeviation.Value);
            Assert.AreEqual(entity.CriticalOvertoppingDischargeMean, inputParameters.CriticalOvertoppingDischarge.Mean.Value);
            Assert.AreEqual(entity.CriticalOvertoppingDischargeCoefficientOfVariation, inputParameters.CriticalOvertoppingDischarge.CoefficientOfVariation.Value);
            Assert.AreEqual(entity.FailureProbabilityStructureWithErosion, inputParameters.FailureProbabilityStructureWithErosion);
            Assert.AreEqual(entity.WidthFlowAperturesMean, inputParameters.WidthFlowApertures.Mean.Value);
            Assert.AreEqual(entity.WidthFlowAperturesStandardDeviation, inputParameters.WidthFlowApertures.StandardDeviation.Value);
            Assert.AreEqual(entity.StormDurationMean, inputParameters.StormDuration.Mean.Value);
            Assert.AreEqual(Convert.ToBoolean(entity.UseBreakWater), inputParameters.UseBreakWater);
            Assert.AreEqual((BreakWaterType)entity.BreakWaterType, inputParameters.BreakWater.Type);
            Assert.AreEqual(entity.BreakWaterHeight, inputParameters.BreakWater.Height.Value);
            Assert.AreEqual(Convert.ToBoolean(entity.UseForeshore), inputParameters.UseForeshore);

            Assert.AreEqual((ClosingStructureInflowModelType)entity.InflowModelType, inputParameters.InflowModelType);
            Assert.AreEqual(entity.InsideWaterLevelMean, inputParameters.InsideWaterLevel.Mean.Value);
            Assert.AreEqual(entity.InsideWaterLevelStandardDeviation, inputParameters.InsideWaterLevel.StandardDeviation.Value);
            Assert.AreEqual(entity.DeviationWaveDirection, inputParameters.DeviationWaveDirection.Value);
            Assert.AreEqual(entity.DrainCoefficientMean, inputParameters.DrainCoefficient.Mean.Value);
            Assert.AreEqual(entity.DrainCoefficientStandardDeviation, inputParameters.DrainCoefficient.StandardDeviation.Value);
            Assert.AreEqual(entity.FactorStormDurationOpenStructure, inputParameters.FactorStormDurationOpenStructure.Value);
            Assert.AreEqual(entity.ThresholdHeightOpenWeirMean, inputParameters.ThresholdHeightOpenWeir.Mean.Value);
            Assert.AreEqual(entity.ThresholdHeightOpenWeirStandardDeviation, inputParameters.ThresholdHeightOpenWeir.StandardDeviation.Value);
            Assert.AreEqual(entity.AreaFlowAperturesMean, inputParameters.AreaFlowApertures.Mean.Value);
            Assert.AreEqual(entity.AreaFlowAperturesStandardDeviation, inputParameters.AreaFlowApertures.StandardDeviation.Value);
            Assert.AreEqual(entity.FailureProbabilityOpenStructure, inputParameters.FailureProbabilityOpenStructure);
            Assert.AreEqual(entity.FailureProbabilityReparation, inputParameters.FailureProbabilityReparation);
            Assert.AreEqual(entity.IdenticalApertures, inputParameters.IdenticalApertures);
            Assert.AreEqual(entity.LevelCrestStructureNotClosingMean, inputParameters.LevelCrestStructureNotClosing.Mean.Value);
            Assert.AreEqual(entity.LevelCrestStructureNotClosingStandardDeviation, inputParameters.LevelCrestStructureNotClosing.StandardDeviation.Value);
            Assert.AreEqual(entity.ProbabilityOpenStructureBeforeFlooding, inputParameters.ProbabilityOpenStructureBeforeFlooding);
            Assert.IsFalse(calculation.HasOutput);
        }
예제 #15
0
        public void Read_EntityWithNullParameters_ReturnClosingStructuresCalculationWithInputParametersNaN()
        {
            // Setup
            var entity = new ClosingStructuresCalculationEntity
            {
                ScenarioContribution                               = 0,
                StructureNormalOrientation                         = null,
                ModelFactorSuperCriticalFlowMean                   = null,
                AllowedLevelIncreaseStorageMean                    = null,
                AllowedLevelIncreaseStorageStandardDeviation       = null,
                StorageStructureAreaMean                           = null,
                StorageStructureAreaCoefficientOfVariation         = null,
                FlowWidthAtBottomProtectionMean                    = null,
                FlowWidthAtBottomProtectionStandardDeviation       = null,
                CriticalOvertoppingDischargeMean                   = null,
                CriticalOvertoppingDischargeCoefficientOfVariation = null,
                WidthFlowAperturesMean                             = null,
                WidthFlowAperturesStandardDeviation                = null,
                StormDurationMean    = null,
                BreakWaterHeight     = null,
                InsideWaterLevelMean = null,
                InsideWaterLevelStandardDeviation = null,
                DeviationWaveDirection            = null,
                DrainCoefficientMean = null,
                DrainCoefficientStandardDeviation        = null,
                FactorStormDurationOpenStructure         = null,
                ThresholdHeightOpenWeirMean              = null,
                ThresholdHeightOpenWeirStandardDeviation = null,
                AreaFlowAperturesMean = null,
                AreaFlowAperturesStandardDeviation             = null,
                LevelCrestStructureNotClosingMean              = null,
                LevelCrestStructureNotClosingStandardDeviation = null,
                IdenticalApertures = 1
            };
            var collector = new ReadConversionCollector();

            // Call
            StructuresCalculationScenario <ClosingStructuresInput> calculation = entity.Read(collector);

            // Assert
            ClosingStructuresInput inputParameters = calculation.InputParameters;

            Assert.IsNaN(inputParameters.StructureNormalOrientation);
            Assert.IsNaN(inputParameters.ModelFactorSuperCriticalFlow.Mean);
            Assert.IsNaN(inputParameters.AllowedLevelIncreaseStorage.Mean);
            Assert.IsNaN(inputParameters.AllowedLevelIncreaseStorage.StandardDeviation);
            Assert.IsNaN(inputParameters.StorageStructureArea.Mean);
            Assert.IsNaN(inputParameters.StorageStructureArea.CoefficientOfVariation);
            Assert.IsNaN(inputParameters.FlowWidthAtBottomProtection.Mean);
            Assert.IsNaN(inputParameters.FlowWidthAtBottomProtection.StandardDeviation);
            Assert.IsNaN(inputParameters.CriticalOvertoppingDischarge.Mean);
            Assert.IsNaN(inputParameters.CriticalOvertoppingDischarge.CoefficientOfVariation);
            Assert.IsNaN(inputParameters.WidthFlowApertures.Mean);
            Assert.IsNaN(inputParameters.WidthFlowApertures.StandardDeviation);
            Assert.IsNaN(inputParameters.StormDuration.Mean);
            Assert.IsNaN(inputParameters.BreakWater.Height);

            Assert.IsNaN(inputParameters.InsideWaterLevel.Mean);
            Assert.IsNaN(inputParameters.InsideWaterLevel.StandardDeviation);
            Assert.IsNaN(inputParameters.DeviationWaveDirection);
            Assert.IsNaN(inputParameters.DrainCoefficient.Mean);
            Assert.IsNaN(inputParameters.DrainCoefficient.StandardDeviation);
            Assert.IsNaN(inputParameters.FactorStormDurationOpenStructure);
            Assert.IsNaN(inputParameters.ThresholdHeightOpenWeir.Mean);
            Assert.IsNaN(inputParameters.ThresholdHeightOpenWeir.StandardDeviation);
            Assert.IsNaN(inputParameters.AreaFlowApertures.Mean);
            Assert.IsNaN(inputParameters.AreaFlowApertures.StandardDeviation);
            Assert.IsNaN(inputParameters.LevelCrestStructureNotClosing.Mean);
            Assert.IsNaN(inputParameters.LevelCrestStructureNotClosing.StandardDeviation);
        }