Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj =================================================================== diff -u -rcecb97ce5adb57cec9f89b557d6fafce09c9ed65 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision cecb97ce5adb57cec9f89b557d6fafce09c9ed65) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Application.Ringtoets.Storage.csproj (.../Application.Ringtoets.Storage.csproj) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -71,6 +71,7 @@ Code + @@ -251,6 +252,7 @@ + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs =================================================================== diff -u -r9ee8f17742a5407fd9453aeb12f20cfedb20c73e -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs (.../PersistenceRegistry.cs) (revision 9ee8f17742a5407fd9453aeb12f20cfedb20c73e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs (.../PersistenceRegistry.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -32,6 +32,7 @@ using Ringtoets.HydraRing.Data; using Ringtoets.Piping.Data; using Ringtoets.Piping.Primitives; +using Ringtoets.StabilityPointStructures.Data; namespace Application.Ringtoets.Storage.Create { @@ -54,6 +55,7 @@ private readonly Dictionary hydraulicLocations = CreateDictionary(); private readonly Dictionary heightStructures = CreateDictionary(); private readonly Dictionary closingStructures = CreateDictionary(); + private readonly Dictionary stabilityPointStructures = CreateDictionary(); private static Dictionary CreateDictionary() { @@ -290,6 +292,22 @@ Register(closingStructures, entity, model); } + /// + /// Registers a create operation for and the + /// that was constructed with the information. + /// + /// The to be registered. + /// The to be registered. + /// Thrown when either: + /// + /// is null + /// is null + /// + internal void Register(StabilityPointStructureEntity entity, StabilityPointStructure model) + { + Register(stabilityPointStructures, entity, model); + } + #endregion #region Contains Methods @@ -415,6 +433,17 @@ return ContainsValue(closingStructures, model); } + /// + /// Checks whether a create operations has been registered for the given . + /// + /// The to check for. + /// true if the was registered before, false otherwise. + /// Thrown when is null. + internal bool Contains(StabilityPointStructure model) + { + return ContainsValue(stabilityPointStructures, model); + } + #endregion #region Get Methods @@ -604,6 +633,22 @@ return Get(closingStructures, model); } + /// + /// Obtains the which was registered for the + /// given . + /// + /// The for which a read operation has been registered. + /// The constructed . + /// Thrown when is null. + /// Thrown when no create operation + /// has been registered for . + /// Use to find out whether a + /// create operation has been registered for . + internal StabilityPointStructureEntity Get(StabilityPointStructure model) + { + return Get(stabilityPointStructures, model); + } + #endregion } } \ No newline at end of file Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityPointStructures/StabilityPointStructureCreateExtensions.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityPointStructures/StabilityPointStructureCreateExtensions.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityPointStructures/StabilityPointStructureCreateExtensions.cs (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -0,0 +1,114 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Application.Ringtoets.Storage.DbContext; +using Core.Common.Utils.Extensions; +using Ringtoets.StabilityPointStructures.Data; + +namespace Application.Ringtoets.Storage.Create.StabilityPointStructures +{ + /// + /// Extension methods for related to creating + /// a . + /// + internal static class StabilityPointStructureCreateExtensions + { + /// + /// Creates a based on the information + /// of the . + /// + /// The structure to create a database entity for. + /// The object keeping track of create operations. + /// The index at which resides within its parent. + /// A new . + /// Thrown when is null. + internal static StabilityPointStructureEntity Create(this StabilityPointStructure structure, PersistenceRegistry registry, int order) + { + if (registry == null) + { + throw new ArgumentNullException("registry"); + } + if (registry.Contains(structure)) + { + return registry.Get(structure); + } + + var entity = new StabilityPointStructureEntity + { + Name = structure.Name.DeepClone(), + Id = structure.Id.DeepClone(), + X = structure.Location.X.ToNaNAsNull(), + Y = structure.Location.Y.ToNaNAsNull(), + StructureNormalOrientation = structure.StructureNormalOrientation.Value.ToNaNAsNull(), + StorageStructureAreaMean = structure.StorageStructureArea.Mean.Value.ToNaNAsNull(), + StorageStructureAreaCoefficientOfVariation = structure.StorageStructureArea.CoefficientOfVariation.Value.ToNaNAsNull(), + AllowedLevelIncreaseStorageMean = structure.AllowedLevelIncreaseStorage.Mean.Value.ToNaNAsNull(), + AllowedLevelIncreaseStorage_StandardDeviation = structure.AllowedLevelIncreaseStorage.StandardDeviation.Value.ToNaNAsNull(), + WidthFlowAperturesMean = structure.WidthFlowApertures.Mean.Value.ToNaNAsNull(), + WidthFlowAperturesCoefficientOfVariation = structure.WidthFlowApertures.CoefficientOfVariation.Value.ToNaNAsNull(), + InsideWaterLevelMean = structure.InsideWaterLevel.Mean.Value.ToNaNAsNull(), + InsideWaterLevelStandardDeviation = structure.InsideWaterLevel.StandardDeviation.Value.ToNaNAsNull(), + ThresholdHeightOpenWeirMean = structure.ThresholdHeightOpenWeir.Mean.Value.ToNaNAsNull(), + ThresholdHeightOpenWeirStandardDeviation = structure.ThresholdHeightOpenWeir.StandardDeviation.Value.ToNaNAsNull(), + CriticalOvertoppingDischargeMean = structure.CriticalOvertoppingDischarge.Mean.Value.ToNaNAsNull(), + CriticalOvertoppingDischargeCoefficientOfVariation = structure.CriticalOvertoppingDischarge.CoefficientOfVariation.Value.ToNaNAsNull(), + FlowWidthAtBottomProtectionMean = structure.FlowWidthAtBottomProtection.Mean.Value.ToNaNAsNull(), + FlowWidthAtBottomProtectionStandardDeviation = structure.FlowWidthAtBottomProtection.StandardDeviation.Value.ToNaNAsNull(), + ConstructiveStrengthLinearLoadModelMean = structure.ConstructiveStrengthLinearLoadModel.Mean.Value.ToNaNAsNull(), + ConstructiveStrengthLinearLoadModelCoefficientOfVariation = structure.ConstructiveStrengthLinearLoadModel.CoefficientOfVariation.Value.ToNaNAsNull(), + ConstructiveStrengthQuadraticLoadModelMean = structure.ConstructiveStrengthQuadraticLoadModel.Mean.Value.ToNaNAsNull(), + ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation = structure.ConstructiveStrengthQuadraticLoadModel.CoefficientOfVariation.Value.ToNaNAsNull(), + BankWidthMean = structure.BankWidth.Mean.Value.ToNaNAsNull(), + BankWidthStandardDeviation = structure.BankWidth.StandardDeviation.Value.ToNaNAsNull(), + InsideWaterLevelFailureConstructionMean = structure.InsideWaterLevelFailureConstruction.Mean.Value.ToNaNAsNull(), + InsideWaterLevelFailureConstructionStandardDeviation = structure.InsideWaterLevelFailureConstruction.StandardDeviation.Value.ToNaNAsNull(), + EvaluationLevel = structure.EvaluationLevel.Value.ToNaNAsNull(), + LevelCrestStructureMean = structure.LevelCrestStructure.Mean.Value.ToNaNAsNull(), + LevelCrestStructureStandardDeviation = structure.LevelCrestStructure.StandardDeviation.Value.ToNaNAsNull(), + VerticalDistance = structure.VerticalDistance.Value.ToNaNAsNull(), + FailureProbabilityRepairClosure = structure.FailureProbabilityRepairClosure.ToNaNAsNull(), + FailureCollisionEnergyMean = structure.FailureCollisionEnergy.Mean.Value.ToNaNAsNull(), + FailureCollisionEnergyCoefficientOfVariation = structure.FailureCollisionEnergy.CoefficientOfVariation.Value.ToNaNAsNull(), + ShipMassMean = structure.ShipMass.Mean.Value.ToNaNAsNull(), + ShipMassCoefficientOfVariation = structure.ShipMass.CoefficientOfVariation.Value.ToNaNAsNull(), + ShipVelocityMean = structure.ShipVelocity.Mean.Value.ToNaNAsNull(), + ShipVelocityCoefficientOfVariation = structure.ShipVelocity.CoefficientOfVariation.Value.ToNaNAsNull(), + LevellingCount = structure.LevellingCount, + ProbabilityCollisionSecondaryStructure = structure.ProbabilityCollisionSecondaryStructure.ToNaNAsNull(), + FlowVelocityStructureClosableMean = structure.FlowVelocityStructureClosable.Mean.Value.ToNaNAsNull(), + FlowVelocityStructureClosableStandardDeviation = structure.FlowVelocityStructureClosable.StandardDeviation.Value.ToNaNAsNull(), + StabilityLinearLoadModelMean = structure.StabilityLinearLoadModel.Mean.Value.ToNaNAsNull(), + StabilityLinearLoadModelCoefficientOfVariation = structure.StabilityLinearLoadModel.CoefficientOfVariation.Value.ToNaNAsNull(), + StabilityQuadraticLoadModelMean = structure.StabilityQuadraticLoadModel.Mean.Value.ToNaNAsNull(), + StabilityQuadraticLoadModelCoefficientOfVariation = structure.StabilityQuadraticLoadModel.CoefficientOfVariation.Value.ToNaNAsNull(), + AreaFlowAperturesMean = structure.AreaFlowApertures.Mean.Value.ToNaNAsNull(), + AreaFlowAperturesStandardDeviation = structure.AreaFlowApertures.StandardDeviation.Value.ToNaNAsNull(), + InflowModelType = Convert.ToByte(structure.InflowModelType), + Order = order + }; + + registry.Register(entity, structure); + + return entity; + } + } +} \ No newline at end of file Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ReadConversionCollector.cs =================================================================== diff -u -r9ee8f17742a5407fd9453aeb12f20cfedb20c73e -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ReadConversionCollector.cs (.../ReadConversionCollector.cs) (revision 9ee8f17742a5407fd9453aeb12f20cfedb20c73e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ReadConversionCollector.cs (.../ReadConversionCollector.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -31,6 +31,7 @@ using Ringtoets.HydraRing.Data; using Ringtoets.Piping.Data; using Ringtoets.Piping.Primitives; +using Ringtoets.StabilityPointStructures.Data; namespace Application.Ringtoets.Storage.Read { @@ -52,6 +53,7 @@ private readonly Dictionary grassCoverErosionInwardsCalculations = CreateDictionary(); private readonly Dictionary heightStructures = CreateDictionary(); private readonly Dictionary closingStructures = CreateDictionary(); + private readonly Dictionary stabilityPointStructures = CreateDictionary(); private static Dictionary CreateDictionary() { @@ -921,5 +923,77 @@ } #endregion + + #region StabilityPointStructureEntity: Read, Contains, Get + + /// + /// Registers a read operation for and the + /// that was constructed with the information. + /// + /// The that was read. + /// The that was constructed. + /// Thrown when either: + /// + /// is null + /// is null + /// + internal void Read(StabilityPointStructureEntity entity, StabilityPointStructure model) + { + if (entity == null) + { + throw new ArgumentNullException("entity"); + } + if (model == null) + { + throw new ArgumentNullException("model"); + } + + stabilityPointStructures[entity] = model; + } + + /// + /// Checks whether a read operation has been registered for a given . + /// + /// The to check for. + /// true if the was read before, false otherwise. + /// Thrown when is null. + internal bool Contains(StabilityPointStructureEntity entity) + { + if (entity == null) + { + throw new ArgumentNullException("entity"); + } + return stabilityPointStructures.ContainsKey(entity); + } + + /// + /// Obtains the which was read for the + /// given . + /// + /// The for which a read + /// operation has been registered. + /// The constructed . + /// Thrown when is null. + /// Thrown when no read operation has + /// been registered for . + /// Use to find out whether a + /// read operation has been registered for . + internal StabilityPointStructure Get(StabilityPointStructureEntity entity) + { + if (entity == null) + { + throw new ArgumentNullException("entity"); + } + try + { + return stabilityPointStructures[entity]; + } + catch (KeyNotFoundException e) + { + throw new InvalidOperationException(e.Message, e); + } + } + + #endregion } } \ No newline at end of file Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructureEntityReadExtensions.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructureEntityReadExtensions.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructureEntityReadExtensions.cs (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -0,0 +1,169 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Application.Ringtoets.Storage.DbContext; +using Core.Common.Base.Data; +using Core.Common.Base.Geometry; +using Ringtoets.StabilityPointStructures.Data; + +namespace Application.Ringtoets.Storage.Read.StabilityPointStructures +{ + /// + /// This class defines extension methods for read operations for a + /// based on the . + /// + internal static class StabilityPointStructureEntityReadExtensions + { + /// + /// Reads the and use the information to update a + /// . + /// + /// The to create for. + /// The object keeping track of read operations. + /// A new . + /// Thrown when is null. + internal static StabilityPointStructure Read(this StabilityPointStructureEntity entity, ReadConversionCollector collector) + { + if (collector == null) + { + throw new ArgumentNullException("collector"); + } + if (collector.Contains(entity)) + { + return collector.Get(entity); + } + + var structure = new StabilityPointStructure(new StabilityPointStructure.ConstructionProperties + { + Name = entity.Name, + Id = entity.Id, + Location = new Point2D(entity.X.ToNullAsNaN(), entity.Y.ToNullAsNaN()), + StructureNormalOrientation = entity.StructureNormalOrientation.ToNullAsNaN(), + StorageStructureArea = + { + Mean = (RoundedDouble)entity.StorageStructureAreaMean.ToNullAsNaN(), + CoefficientOfVariation = (RoundedDouble)entity.StorageStructureAreaCoefficientOfVariation.ToNullAsNaN() + }, + AllowedLevelIncreaseStorage = + { + Mean = (RoundedDouble)entity.AllowedLevelIncreaseStorageMean.ToNullAsNaN(), + StandardDeviation = (RoundedDouble)entity.AllowedLevelIncreaseStorage_StandardDeviation.ToNullAsNaN() + }, + FlowWidthAtBottomProtection = + { + Mean = (RoundedDouble)entity.FlowWidthAtBottomProtectionMean.ToNullAsNaN(), + StandardDeviation = (RoundedDouble)entity.FlowWidthAtBottomProtectionStandardDeviation.ToNullAsNaN() + }, + InsideWaterLevel = + { + Mean = (RoundedDouble)entity.InsideWaterLevelMean.ToNullAsNaN(), + StandardDeviation = (RoundedDouble)entity.InsideWaterLevelStandardDeviation.ToNullAsNaN() + }, + ThresholdHeightOpenWeir = + { + Mean = (RoundedDouble)entity.ThresholdHeightOpenWeirMean.ToNullAsNaN(), + StandardDeviation = (RoundedDouble)entity.ThresholdHeightOpenWeirStandardDeviation.ToNullAsNaN() + }, + CriticalOvertoppingDischarge = + { + Mean = (RoundedDouble)entity.CriticalOvertoppingDischargeMean.ToNullAsNaN(), + CoefficientOfVariation = (RoundedDouble)entity.CriticalOvertoppingDischargeCoefficientOfVariation.ToNullAsNaN() + }, + WidthFlowApertures = + { + Mean = (RoundedDouble)entity.WidthFlowAperturesMean.ToNullAsNaN(), + CoefficientOfVariation = (RoundedDouble)entity.WidthFlowAperturesCoefficientOfVariation.ToNullAsNaN() + }, + ConstructiveStrengthLinearLoadModel = + { + Mean = (RoundedDouble)entity.ConstructiveStrengthLinearLoadModelMean.ToNullAsNaN(), + CoefficientOfVariation = (RoundedDouble)entity.ConstructiveStrengthLinearLoadModelCoefficientOfVariation.ToNullAsNaN() + }, + ConstructiveStrengthQuadraticLoadModel = + { + Mean = (RoundedDouble)entity.ConstructiveStrengthQuadraticLoadModelMean.ToNullAsNaN(), + CoefficientOfVariation = (RoundedDouble)entity.ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation.ToNullAsNaN() + }, + BankWidth = + { + Mean = (RoundedDouble)entity.BankWidthMean.ToNullAsNaN(), + StandardDeviation = (RoundedDouble)entity.BankWidthStandardDeviation.ToNullAsNaN() + }, + InsideWaterLevelFailureConstruction = + { + Mean = (RoundedDouble)entity.InsideWaterLevelFailureConstructionMean.ToNullAsNaN(), + StandardDeviation = (RoundedDouble)entity.InsideWaterLevelFailureConstructionStandardDeviation.ToNullAsNaN() + }, + EvaluationLevel = (RoundedDouble)entity.EvaluationLevel.ToNullAsNaN(), + LevelCrestStructure = + { + Mean = (RoundedDouble)entity.LevelCrestStructureMean.ToNullAsNaN(), + StandardDeviation = (RoundedDouble)entity.LevelCrestStructureStandardDeviation.ToNullAsNaN() + }, + VerticalDistance = (RoundedDouble)entity.VerticalDistance.ToNullAsNaN(), + FailureProbabilityRepairClosure = entity.FailureProbabilityRepairClosure.ToNullAsNaN(), + FailureCollisionEnergy = + { + Mean = (RoundedDouble)entity.FailureCollisionEnergyMean.ToNullAsNaN(), + CoefficientOfVariation = (RoundedDouble)entity.FailureCollisionEnergyCoefficientOfVariation.ToNullAsNaN() + }, + ShipMass = + { + Mean = (RoundedDouble)entity.ShipMassMean.ToNullAsNaN(), + CoefficientOfVariation = (RoundedDouble)entity.ShipMassCoefficientOfVariation.ToNullAsNaN() + }, + ShipVelocity = + { + Mean = (RoundedDouble)entity.ShipVelocityMean.ToNullAsNaN(), + CoefficientOfVariation = (RoundedDouble)entity.ShipVelocityCoefficientOfVariation.ToNullAsNaN() + }, + LevellingCount = entity.LevellingCount, + ProbabilityCollisionSecondaryStructure = entity.ProbabilityCollisionSecondaryStructure.ToNullAsNaN(), + FlowVelocityStructureClosable = + { + Mean = (RoundedDouble)entity.FlowVelocityStructureClosableMean.ToNullAsNaN(), + StandardDeviation = (RoundedDouble)entity.FlowVelocityStructureClosableStandardDeviation.ToNullAsNaN() + }, + StabilityLinearLoadModel = + { + Mean = (RoundedDouble)entity.StabilityLinearLoadModelMean.ToNullAsNaN(), + CoefficientOfVariation = (RoundedDouble)entity.StabilityLinearLoadModelCoefficientOfVariation.ToNullAsNaN() + }, + StabilityQuadraticLoadModel = + { + Mean = (RoundedDouble)entity.StabilityQuadraticLoadModelMean.ToNullAsNaN(), + CoefficientOfVariation = (RoundedDouble)entity.StabilityQuadraticLoadModelCoefficientOfVariation.ToNullAsNaN() + }, + AreaFlowApertures = + { + Mean = (RoundedDouble)entity.AreaFlowAperturesMean.ToNullAsNaN(), + StandardDeviation = (RoundedDouble)entity.AreaFlowAperturesStandardDeviation.ToNullAsNaN() + }, + InflowModelType = (StabilityPointStructureInflowModelType)entity.InflowModelType + }); + + collector.Read(entity, structure); + + return structure; + } + } +} \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Application.Ringtoets.Storage.Test.csproj =================================================================== diff -u -rcecb97ce5adb57cec9f89b557d6fafce09c9ed65 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Application.Ringtoets.Storage.Test.csproj (.../Application.Ringtoets.Storage.Test.csproj) (revision cecb97ce5adb57cec9f89b557d6fafce09c9ed65) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Application.Ringtoets.Storage.Test.csproj (.../Application.Ringtoets.Storage.Test.csproj) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -87,6 +87,7 @@ Code + @@ -100,6 +101,7 @@ + @@ -255,6 +257,10 @@ {3D4B9740-8348-4434-8D77-B611FC6EE57F} Ringtoets.StabilityPointStructures.Data + + {e9ac095b-8f10-41d2-9456-4a85e3ba91ad} + Ringtoets.StabilityPointStructures.Data.TestUtil + {567E0B69-5280-41CE-ADD6-443725A61C86} Ringtoets.WaveImpactAsphaltCover.Data Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructureCreateExtensionsTest.cs =================================================================== diff -u -r9ee8f17742a5407fd9453aeb12f20cfedb20c73e -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructureCreateExtensionsTest.cs (.../ClosingStructureCreateExtensionsTest.cs) (revision 9ee8f17742a5407fd9453aeb12f20cfedb20c73e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructureCreateExtensionsTest.cs (.../ClosingStructureCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -109,48 +109,48 @@ StructureNormalOrientation = double.NaN, StorageStructureArea = { - Mean = (RoundedDouble)double.NaN, - CoefficientOfVariation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN }, AllowedLevelIncreaseStorage = { - Mean = (RoundedDouble)double.NaN, - StandardDeviation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, WidthFlowApertures = { - Mean = (RoundedDouble)double.NaN, - CoefficientOfVariation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN }, LevelCrestStructureNotClosing = { - Mean = (RoundedDouble)double.NaN, - StandardDeviation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, InsideWaterLevel = { - Mean = (RoundedDouble)double.NaN, - StandardDeviation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, ThresholdHeightOpenWeir = { - Mean = (RoundedDouble)double.NaN, - StandardDeviation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, AreaFlowApertures = { - Mean = (RoundedDouble)double.NaN, - StandardDeviation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, CriticalOvertoppingDischarge = { - Mean = (RoundedDouble)double.NaN, - CoefficientOfVariation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN }, FlowWidthAtBottomProtection = { - Mean = (RoundedDouble)double.NaN, - StandardDeviation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, ProbabilityOpenStructureBeforeFlooding = double.NaN, FailureProbabilityOpenStructure = double.NaN, Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -rfe1332c1e9b14365a62f6ce03c9494393223179e -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision fe1332c1e9b14365a62f6ce03c9494393223179e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -71,7 +71,7 @@ // Setup var sectionResult = new ClosingStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs (.../DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs (.../DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -75,7 +75,7 @@ // Setup var sectionResult = new DuneErosionFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsCalculationCreateExtensionsTest.cs =================================================================== diff -u -rfa2d88ba58e524c1d132a21df4e0adf9fa6570c4 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsCalculationCreateExtensionsTest.cs (.../GrassCoverErosionInwardsCalculationCreateExtensionsTest.cs) (revision fa2d88ba58e524c1d132a21df4e0adf9fa6570c4) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsCalculationCreateExtensionsTest.cs (.../GrassCoverErosionInwardsCalculationCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -146,16 +146,16 @@ { InputParameters = { - Orientation = (RoundedDouble) double.NaN, + Orientation = RoundedDouble.NaN, CriticalFlowRate = { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, - DikeHeight = (RoundedDouble) double.NaN, + DikeHeight = RoundedDouble.NaN, BreakWater = { - Height = (RoundedDouble) double.NaN + Height = RoundedDouble.NaN } } }; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverErosionInwardsMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverErosionInwardsMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -75,7 +75,7 @@ // Setup var sectionResult = new GrassCoverErosionInwardsFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; var registry = new PersistenceRegistry(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r5e0253e5d6a341d58a67e47830de4845e8699b0c -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverErosionOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 5e0253e5d6a341d58a67e47830de4845e8699b0c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverErosionOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -76,7 +76,7 @@ // Setup var sectionResult = new GrassCoverErosionOutwardsFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffInwards/GrassCoverSlipOffInwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffInwards/GrassCoverSlipOffInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverSlipOffInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffInwards/GrassCoverSlipOffInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverSlipOffInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -75,7 +75,7 @@ // Setup var sectionResult = new GrassCoverSlipOffInwardsFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffOutwards/GrassCoverSlipOffOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -racfeebf1048eabf0027b59803170d5852ab86a14 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffOutwards/GrassCoverSlipOffOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverSlipOffOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision acfeebf1048eabf0027b59803170d5852ab86a14) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffOutwards/GrassCoverSlipOffOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverSlipOffOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -76,7 +76,7 @@ // Setup var sectionResult = new GrassCoverSlipOffOutwardsFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructureCreateExtensionsTest.cs =================================================================== diff -u -rcecb97ce5adb57cec9f89b557d6fafce09c9ed65 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructureCreateExtensionsTest.cs (.../HeightStructureCreateExtensionsTest.cs) (revision cecb97ce5adb57cec9f89b557d6fafce09c9ed65) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructureCreateExtensionsTest.cs (.../HeightStructureCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -98,34 +98,34 @@ StructureNormalOrientation = double.NaN, AllowedLevelIncreaseStorage = { - Mean = (RoundedDouble)double.NaN, - StandardDeviation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, CriticalOvertoppingDischarge = { - Mean = (RoundedDouble)double.NaN, - CoefficientOfVariation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN }, FailureProbabilityStructureWithErosion = double.NaN, FlowWidthAtBottomProtection = { - Mean = (RoundedDouble)double.NaN, - StandardDeviation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, LevelCrestStructure = { - Mean = (RoundedDouble)double.NaN, - StandardDeviation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, StorageStructureArea = { - Mean = (RoundedDouble)double.NaN, - CoefficientOfVariation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN }, WidthFlowApertures = { - Mean = (RoundedDouble)double.NaN, - CoefficientOfVariation = (RoundedDouble)double.NaN + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN } }); var registry = new PersistenceRegistry(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresCalculationCreateExtensionsTest.cs =================================================================== diff -u -rab20c4eb4ca81bd3845d50210d2bdb301177af6a -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresCalculationCreateExtensionsTest.cs (.../HeightStructuresCalculationCreateExtensionsTest.cs) (revision ab20c4eb4ca81bd3845d50210d2bdb301177af6a) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresCalculationCreateExtensionsTest.cs (.../HeightStructuresCalculationCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -167,50 +167,50 @@ { InputParameters = { - StructureNormalOrientation = (RoundedDouble) double.NaN, + StructureNormalOrientation = RoundedDouble.NaN, ModelFactorSuperCriticalFlow = { - Mean = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN }, AllowedLevelIncreaseStorage = { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, StorageStructureArea = { - Mean = (RoundedDouble) double.NaN, - CoefficientOfVariation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN }, FlowWidthAtBottomProtection = { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, CriticalOvertoppingDischarge = { - Mean = (RoundedDouble) double.NaN, - CoefficientOfVariation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN }, WidthFlowApertures = { - Mean = (RoundedDouble) double.NaN, - CoefficientOfVariation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN }, StormDuration = { - Mean = (RoundedDouble) double.NaN, - CoefficientOfVariation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN }, LevelCrestStructure = { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }, - DeviationWaveDirection = (RoundedDouble) double.NaN, + DeviationWaveDirection = RoundedDouble.NaN, BreakWater = { - Height = (RoundedDouble) double.NaN + Height = RoundedDouble.NaN } } }; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../HeightStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../HeightStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -71,7 +71,7 @@ // Setup var sectionResult = new HeightStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityInwards/MacrostabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityInwards/MacrostabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../MacrostabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityInwards/MacrostabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../MacrostabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -74,7 +74,7 @@ // Setup var sectionResult = new MacrostabilityInwardsFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerTwoA = (RoundedDouble) double.NaN + AssessmentLayerTwoA = RoundedDouble.NaN }; // Call @@ -90,7 +90,7 @@ // Setup var sectionResult = new MacrostabilityInwardsFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityOutwards/MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityOutwards/MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityOutwards/MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -74,7 +74,7 @@ // Setup var sectionResult = new MacrostabilityOutwardsFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerTwoA = (RoundedDouble) double.NaN + AssessmentLayerTwoA = RoundedDouble.NaN }; // Call @@ -90,7 +90,7 @@ // Setup var sectionResult = new MacrostabilityOutwardsFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Microstability/MicrostabilityFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Microstability/MicrostabilityFailureMechanismSectionResultCreateExtensionsTest.cs (.../MicrostabilityFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Microstability/MicrostabilityFailureMechanismSectionResultCreateExtensionsTest.cs (.../MicrostabilityFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -75,7 +75,7 @@ // Setup var sectionResult = new MicrostabilityFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs =================================================================== diff -u -r9ee8f17742a5407fd9453aeb12f20cfedb20c73e -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs (.../PersistenceRegistryTest.cs) (revision 9ee8f17742a5407fd9453aeb12f20cfedb20c73e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs (.../PersistenceRegistryTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -37,6 +37,8 @@ using Ringtoets.Piping.Data.TestUtil; using Ringtoets.Piping.KernelWrapper.TestUtil; using Ringtoets.Piping.Primitives; +using Ringtoets.StabilityPointStructures.Data; +using Ringtoets.StabilityPointStructures.Data.TestUtil; namespace Application.Ringtoets.Storage.Test.Create { @@ -701,6 +703,67 @@ Assert.IsFalse(result); } + [Test] + public void Contains_WithoutStabilityPointStructure_ThrowsArgumentNullException() + { + // Setup + var registry = new PersistenceRegistry(); + + // Call + TestDelegate call = () => registry.Contains((StabilityPointStructure)null); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("model", paramName); + } + + [Test] + public void Contains_StabilityPointStructureAdded_ReturnsTrue() + { + // Setup + StabilityPointStructure stabilityPointStructure = new TestStabilityPointStructure(); + var registry = new PersistenceRegistry(); + registry.Register(new StabilityPointStructureEntity(), stabilityPointStructure); + + // Call + bool result = registry.Contains(stabilityPointStructure); + + // Assert + Assert.IsTrue(result); + } + + [Test] + public void Contains_OtherStabilityPointStructureAdded_ReturnsFalse() + { + // Setup + StabilityPointStructure stabilityPointStructure = new TestStabilityPointStructure(); + + StabilityPointStructure otherStructure = new TestStabilityPointStructure(); + var registry = new PersistenceRegistry(); + registry.Register(new StabilityPointStructureEntity(), otherStructure); + + // Call + bool result = registry.Contains(stabilityPointStructure); + + // Assert + Assert.IsFalse(result); + } + + [Test] + public void Contains_NoStabilityPointStructureAdded_ReturnsFalse() + { + // Setup + StabilityPointStructure stabilityPointStructure = new TestStabilityPointStructure(); + + var registry = new PersistenceRegistry(); + + // Call + bool result = registry.Contains(stabilityPointStructure); + + // Assert + Assert.IsFalse(result); + } + #endregion #region Get methods @@ -1311,6 +1374,69 @@ Assert.AreSame(registeredEntity, retrievedEntity); } + [Test] + public void Get_WithoutStabilityPointStructure_ThrowsArgumentNullException() + { + // Setup + var registry = new PersistenceRegistry(); + + // Call + TestDelegate call = () => registry.Get((StabilityPointStructure)null); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("model", paramName); + } + + [Test] + public void Get_NoStabilityPointStructureAdded_ThrowsInvalidOperationException() + { + // Setup + StabilityPointStructure stabilityPointStructure = new TestStabilityPointStructure(); + var registry = new PersistenceRegistry(); + + // Call + TestDelegate call = () => registry.Get(stabilityPointStructure); + + // Assert + Assert.Throws(call); + } + + [Test] + public void Get_OtherStabilityPointStructureAdded_ThrowsInvalidOperationException() + { + // Setup + StabilityPointStructure stabilityPointStructure = new TestStabilityPointStructure(); + StabilityPointStructure registeredStructure = new TestStabilityPointStructure(); + var registeredEntity = new StabilityPointStructureEntity(); + + var registry = new PersistenceRegistry(); + registry.Register(registeredEntity, registeredStructure); + + // Call + TestDelegate call = () => registry.Get(stabilityPointStructure); + + // Assert + Assert.Throws(call); + } + + [Test] + public void Get_StabilityPointStructureAdded_ReturnsEntity() + { + // Setup + StabilityPointStructure stabilityPointStructure = new TestStabilityPointStructure(); + var registeredEntity = new StabilityPointStructureEntity(); + + var registry = new PersistenceRegistry(); + registry.Register(registeredEntity, stabilityPointStructure); + + // Call + StabilityPointStructureEntity retrievedEntity = registry.Get(stabilityPointStructure); + + // Assert + Assert.AreSame(registeredEntity, retrievedEntity); + } + #endregion #region Register methods @@ -1556,6 +1682,21 @@ Assert.AreEqual("model", paramName); } + + [Test] + public void Register_WithNullStabilityPointStructure_ThrowsArgumentNullException() + { + // Setup + var registry = new PersistenceRegistry(); + + // Call + TestDelegate test = () => registry.Register(new StabilityPointStructureEntity(), null); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("model", paramName); + } + #endregion } } \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismSectionResultCreateExtensionsTest.cs (.../PipingFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismSectionResultCreateExtensionsTest.cs (.../PipingFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -71,7 +71,7 @@ // Setup var sectionResult = new PipingFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PipingStructure/PipingStructureFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PipingStructure/PipingStructureFailureMechanismSectionResultCreateExtensionsTest.cs (.../PipingStructureFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PipingStructure/PipingStructureFailureMechanismSectionResultCreateExtensionsTest.cs (.../PipingStructureFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -75,7 +75,7 @@ // Setup var sectionResult = new PipingStructureFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructureCreateExtensionsTest.cs =================================================================== diff -u --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructureCreateExtensionsTest.cs (revision 0) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructureCreateExtensionsTest.cs (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -0,0 +1,302 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Application.Ringtoets.Storage.Create; +using Application.Ringtoets.Storage.Create.StabilityPointStructures; +using Application.Ringtoets.Storage.DbContext; +using Core.Common.Base.Data; +using Core.Common.Base.Geometry; +using NUnit.Framework; +using Ringtoets.StabilityPointStructures.Data; +using Ringtoets.StabilityPointStructures.Data.TestUtil; + +namespace Application.Ringtoets.Storage.Test.Create.StabilityPointStructures +{ + [TestFixture] + public class StabilityPointStructureCreateExtensionsTest + { + [Test] + public void Create_PersistenceRegistryNull_ThrowArgumentNullException() + { + // Setup + StabilityPointStructure structure = new TestStabilityPointStructure(); + + // Call + TestDelegate call = () => structure.Create(null, 0); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("registry", paramName); + } + + [Test] + public void Create_ValidStrucuture_ReturnEntity() + { + // Setup + StabilityPointStructure structure = new TestStabilityPointStructure(); + var registry = new PersistenceRegistry(); + + const int order = 4; + + // Call + StabilityPointStructureEntity entity = structure.Create(registry, order); + + // Assert + Assert.AreEqual(structure.Name, entity.Name); + Assert.AreNotSame(structure.Name, entity.Name); + Assert.AreEqual(structure.Id, entity.Id); + Assert.AreNotSame(structure.Id, entity.Id); + Assert.AreEqual(structure.Location.X, entity.X); + Assert.AreEqual(structure.Location.Y, entity.Y); + Assert.AreEqual(structure.StructureNormalOrientation.Value, entity.StructureNormalOrientation); + + Assert.AreEqual(structure.StorageStructureArea.Mean.Value, entity.StorageStructureAreaMean); + Assert.AreEqual(structure.StorageStructureArea.CoefficientOfVariation.Value, entity.StorageStructureAreaCoefficientOfVariation); + Assert.AreEqual(structure.AllowedLevelIncreaseStorage.Mean.Value, entity.AllowedLevelIncreaseStorageMean); + Assert.AreEqual(structure.AllowedLevelIncreaseStorage.StandardDeviation.Value, entity.AllowedLevelIncreaseStorage_StandardDeviation); + Assert.AreEqual(structure.WidthFlowApertures.Mean.Value, entity.WidthFlowAperturesMean); + Assert.AreEqual(structure.WidthFlowApertures.CoefficientOfVariation.Value, entity.WidthFlowAperturesCoefficientOfVariation); + Assert.AreEqual(structure.InsideWaterLevel.Mean.Value, entity.InsideWaterLevelMean); + Assert.AreEqual(structure.InsideWaterLevel.StandardDeviation.Value, entity.InsideWaterLevelStandardDeviation); + Assert.AreEqual(structure.ThresholdHeightOpenWeir.Mean.Value, entity.ThresholdHeightOpenWeirMean); + Assert.AreEqual(structure.ThresholdHeightOpenWeir.StandardDeviation.Value, entity.ThresholdHeightOpenWeirStandardDeviation); + Assert.AreEqual(structure.CriticalOvertoppingDischarge.Mean.Value, entity.CriticalOvertoppingDischargeMean); + Assert.AreEqual(structure.CriticalOvertoppingDischarge.CoefficientOfVariation.Value, entity.CriticalOvertoppingDischargeCoefficientOfVariation); + Assert.AreEqual(structure.FlowWidthAtBottomProtection.Mean.Value, entity.FlowWidthAtBottomProtectionMean); + Assert.AreEqual(structure.FlowWidthAtBottomProtection.StandardDeviation.Value, entity.FlowWidthAtBottomProtectionStandardDeviation); + Assert.AreEqual(structure.ConstructiveStrengthLinearLoadModel.Mean.Value, entity.ConstructiveStrengthLinearLoadModelMean); + Assert.AreEqual(structure.ConstructiveStrengthLinearLoadModel.CoefficientOfVariation.Value, entity.ConstructiveStrengthLinearLoadModelCoefficientOfVariation); + Assert.AreEqual(structure.ConstructiveStrengthQuadraticLoadModel.Mean.Value, entity.ConstructiveStrengthQuadraticLoadModelMean); + Assert.AreEqual(structure.ConstructiveStrengthQuadraticLoadModel.CoefficientOfVariation.Value, entity.ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation); + Assert.AreEqual(structure.BankWidth.Mean.Value, entity.BankWidthMean); + Assert.AreEqual(structure.BankWidth.StandardDeviation.Value, entity.BankWidthStandardDeviation); + Assert.AreEqual(structure.InsideWaterLevelFailureConstruction.Mean.Value, entity.InsideWaterLevelFailureConstructionMean); + Assert.AreEqual(structure.InsideWaterLevelFailureConstruction.StandardDeviation.Value, entity.InsideWaterLevelFailureConstructionStandardDeviation); + Assert.AreEqual(structure.EvaluationLevel.Value, entity.EvaluationLevel); + Assert.AreEqual(structure.LevelCrestStructure.Mean.Value, entity.LevelCrestStructureMean); + Assert.AreEqual(structure.LevelCrestStructure.StandardDeviation.Value, entity.LevelCrestStructureStandardDeviation); + Assert.AreEqual(structure.VerticalDistance.Value, entity.VerticalDistance); + Assert.AreEqual(structure.FailureProbabilityRepairClosure, entity.FailureProbabilityRepairClosure); + Assert.AreEqual(structure.FailureCollisionEnergy.Mean.Value, entity.FailureCollisionEnergyMean); + Assert.AreEqual(structure.FailureCollisionEnergy.CoefficientOfVariation.Value, entity.FailureCollisionEnergyCoefficientOfVariation); + Assert.AreEqual(structure.ShipMass.Mean.Value, entity.ShipMassMean); + Assert.AreEqual(structure.ShipMass.CoefficientOfVariation.Value, entity.ShipMassCoefficientOfVariation); + Assert.AreEqual(structure.ShipVelocity.Mean.Value, entity.ShipVelocityMean); + Assert.AreEqual(structure.ShipVelocity.CoefficientOfVariation.Value, entity.ShipVelocityCoefficientOfVariation); + Assert.AreEqual(structure.LevellingCount, entity.LevellingCount); + Assert.AreEqual(structure.ProbabilityCollisionSecondaryStructure, entity.ProbabilityCollisionSecondaryStructure); + Assert.AreEqual(structure.FlowVelocityStructureClosable.Mean.Value, entity.FlowVelocityStructureClosableMean); + Assert.AreEqual(structure.FlowVelocityStructureClosable.StandardDeviation.Value, entity.FlowVelocityStructureClosableStandardDeviation); + Assert.AreEqual(structure.StabilityLinearLoadModel.Mean.Value, entity.StabilityLinearLoadModelMean); + Assert.AreEqual(structure.StabilityLinearLoadModel.CoefficientOfVariation.Value, entity.StabilityLinearLoadModelCoefficientOfVariation); + Assert.AreEqual(structure.StabilityQuadraticLoadModel.Mean.Value, entity.StabilityQuadraticLoadModelMean); + Assert.AreEqual(structure.StabilityQuadraticLoadModel.CoefficientOfVariation.Value, entity.StabilityQuadraticLoadModelCoefficientOfVariation); + Assert.AreEqual(structure.AreaFlowApertures.Mean.Value, entity.AreaFlowAperturesMean); + Assert.AreEqual(structure.AreaFlowApertures.StandardDeviation.Value, entity.AreaFlowAperturesStandardDeviation); + Assert.AreEqual(Convert.ToByte(structure.InflowModelType), entity.InflowModelType); + Assert.AreEqual(order, entity.Order); + + Assert.IsTrue(registry.Contains(structure)); + } + + [Test] + public void Create_NaNValue_ReturnEntityWithNullValue() + { + // Setup + var structure = new StabilityPointStructure(new StabilityPointStructure.ConstructionProperties + { + Name = "A", + Id = "B", + Location = new Point2D(double.NaN, double.NaN), + StructureNormalOrientation = double.NaN, + StorageStructureArea = + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }, + AllowedLevelIncreaseStorage = + { + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN + }, + WidthFlowApertures = + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }, + InsideWaterLevel = + { + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN + }, + ThresholdHeightOpenWeir = + { + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN + }, + CriticalOvertoppingDischarge = + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }, + FlowWidthAtBottomProtection = + { + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN + }, + ConstructiveStrengthLinearLoadModel = + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }, + ConstructiveStrengthQuadraticLoadModel = + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }, + BankWidth = + { + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN + }, + InsideWaterLevelFailureConstruction = + { + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN + }, + EvaluationLevel = RoundedDouble.NaN, + LevelCrestStructure = + { + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN + }, + VerticalDistance = RoundedDouble.NaN, + FailureProbabilityRepairClosure = double.NaN, + FailureCollisionEnergy = + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }, + ShipMass = + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }, + ShipVelocity = + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }, + ProbabilityCollisionSecondaryStructure = double.NaN, + FlowVelocityStructureClosable = + { + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN + }, + StabilityLinearLoadModel = + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }, + StabilityQuadraticLoadModel = + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }, + AreaFlowApertures = + { + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN + } + }); + var registry = new PersistenceRegistry(); + + // Call + StabilityPointStructureEntity entity = structure.Create(registry, 0); + + // Assert + Assert.IsNull(entity.X); + Assert.IsNull(entity.Y); + Assert.IsNull(entity.StructureNormalOrientation); + + Assert.IsNull(entity.StorageStructureAreaMean); + Assert.IsNull(entity.StorageStructureAreaCoefficientOfVariation); + Assert.IsNull(entity.AllowedLevelIncreaseStorageMean); + Assert.IsNull(entity.AllowedLevelIncreaseStorage_StandardDeviation); + Assert.IsNull(entity.WidthFlowAperturesMean); + Assert.IsNull(entity.WidthFlowAperturesCoefficientOfVariation); + Assert.IsNull(entity.InsideWaterLevelMean); + Assert.IsNull(entity.InsideWaterLevelStandardDeviation); + Assert.IsNull(entity.ThresholdHeightOpenWeirMean); + Assert.IsNull(entity.ThresholdHeightOpenWeirStandardDeviation); + Assert.IsNull(entity.CriticalOvertoppingDischargeMean); + Assert.IsNull(entity.CriticalOvertoppingDischargeCoefficientOfVariation); + Assert.IsNull(entity.FlowWidthAtBottomProtectionMean); + Assert.IsNull(entity.FlowWidthAtBottomProtectionStandardDeviation); + Assert.IsNull(entity.ConstructiveStrengthLinearLoadModelMean); + Assert.IsNull(entity.ConstructiveStrengthLinearLoadModelCoefficientOfVariation); + Assert.IsNull(entity.ConstructiveStrengthQuadraticLoadModelMean); + Assert.IsNull(entity.ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation); + Assert.IsNull(entity.BankWidthMean); + Assert.IsNull(entity.BankWidthStandardDeviation); + Assert.IsNull(entity.InsideWaterLevelFailureConstructionMean); + Assert.IsNull(entity.InsideWaterLevelFailureConstructionStandardDeviation); + Assert.IsNull(entity.EvaluationLevel); + Assert.IsNull(entity.LevelCrestStructureMean); + Assert.IsNull(entity.LevelCrestStructureStandardDeviation); + Assert.IsNull(entity.VerticalDistance); + Assert.IsNull(entity.FailureProbabilityRepairClosure); + Assert.IsNull(entity.FailureCollisionEnergyMean); + Assert.IsNull(entity.FailureCollisionEnergyCoefficientOfVariation); + Assert.IsNull(entity.ShipMassMean); + Assert.IsNull(entity.ShipMassCoefficientOfVariation); + Assert.IsNull(entity.ShipVelocityMean); + Assert.IsNull(entity.ShipVelocityCoefficientOfVariation); + Assert.IsNull(entity.ProbabilityCollisionSecondaryStructure); + Assert.IsNull(entity.FlowVelocityStructureClosableMean); + Assert.IsNull(entity.FlowVelocityStructureClosableStandardDeviation); + Assert.IsNull(entity.StabilityLinearLoadModelMean); + Assert.IsNull(entity.StabilityLinearLoadModelCoefficientOfVariation); + Assert.IsNull(entity.StabilityQuadraticLoadModelMean); + Assert.IsNull(entity.StabilityQuadraticLoadModelCoefficientOfVariation); + Assert.IsNull(entity.AreaFlowAperturesMean); + Assert.IsNull(entity.AreaFlowAperturesStandardDeviation); + } + + [Test] + public void Create_StructureAlreadyRegistered_ReturnRegisteredEntity() + { + // Setup + var structure = new TestStabilityPointStructure(); + + var registeredEntity = new StabilityPointStructureEntity(); + var registry = new PersistenceRegistry(); + registry.Register(registeredEntity, structure); + + // Call + StabilityPointStructureEntity entity = structure.Create(registry, 0); + + // Assert + Assert.AreSame(registeredEntity, entity); + } + } +} \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -74,7 +74,7 @@ // Setup var sectionResult = new StabilityPointStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerTwoA = (RoundedDouble) double.NaN + AssessmentLayerTwoA = RoundedDouble.NaN }; // Call @@ -90,7 +90,7 @@ // Setup var sectionResult = new StabilityPointStructuresFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -rfdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision fdd03cdaf7c9eed6fccaa5aa591f71deddcb2b74) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -75,7 +75,7 @@ // Setup var sectionResult = new StabilityStoneCoverFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StrengthStabilityLengthwise/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StrengthStabilityLengthwise/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultCreateExtensionsTest.cs (.../StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StrengthStabilityLengthwise/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultCreateExtensionsTest.cs (.../StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -71,7 +71,7 @@ // Setup var sectionResult = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/TechnicalInnovation/TechnicalInnovationFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/TechnicalInnovation/TechnicalInnovationFailureMechanismSectionResultCreateExtensionsTest.cs (.../TechnicalInnovationFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/TechnicalInnovation/TechnicalInnovationFailureMechanismSectionResultCreateExtensionsTest.cs (.../TechnicalInnovationFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -71,7 +71,7 @@ // Setup var sectionResult = new TechnicalInnovationFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r05013c44d1273bac219a442dc7959706c6bac715 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../WaterPressureAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 05013c44d1273bac219a442dc7959706c6bac715) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../WaterPressureAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -72,7 +72,7 @@ // Setup var sectionResult = new WaterPressureAsphaltCoverFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r944d2501b3f780d208e00015a1b850afad4c3aa8 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../WaveImpactAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 944d2501b3f780d208e00015a1b850afad4c3aa8) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../WaveImpactAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -75,7 +75,7 @@ // Setup var sectionResult = new WaveImpactAsphaltCoverFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerTwoA = (RoundedDouble) double.NaN + AssessmentLayerTwoA = RoundedDouble.NaN }; // Call @@ -91,7 +91,7 @@ // Setup var sectionResult = new WaveImpactAsphaltCoverFailureMechanismSectionResult(new TestFailureMechanismSection()) { - AssessmentLayerThree = (RoundedDouble) double.NaN + AssessmentLayerThree = RoundedDouble.NaN }; // Call Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ReadConversionCollectorTest.cs =================================================================== diff -u -r9ee8f17742a5407fd9453aeb12f20cfedb20c73e -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ReadConversionCollectorTest.cs (.../ReadConversionCollectorTest.cs) (revision 9ee8f17742a5407fd9453aeb12f20cfedb20c73e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ReadConversionCollectorTest.cs (.../ReadConversionCollectorTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -35,6 +35,8 @@ using Ringtoets.Piping.Data; using Ringtoets.Piping.KernelWrapper.TestUtil; using Ringtoets.Piping.Primitives; +using Ringtoets.StabilityPointStructures.Data; +using Ringtoets.StabilityPointStructures.Data.TestUtil; namespace Application.Ringtoets.Storage.Test.Read { @@ -1559,7 +1561,7 @@ var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Contains((ClosingStructureEntity)null); + TestDelegate test = () => collector.Contains((ClosingStructureEntity) null); // Assert string paramName = Assert.Throws(test).ParamName; @@ -1617,7 +1619,7 @@ var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Get((ClosingStructureEntity)null); + TestDelegate test = () => collector.Get((ClosingStructureEntity) null); // Assert string paramName = Assert.Throws(test).ParamName; @@ -1698,5 +1700,154 @@ } #endregion + + #region StabilityPointStructureEntity: Read, Contains, Get + + [Test] + public void Contains_WithoutStabilityPointStructureEntity_ThrowsArgumentNullException() + { + // Setup + var collector = new ReadConversionCollector(); + + // Call + TestDelegate test = () => collector.Contains((StabilityPointStructureEntity) null); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("entity", paramName); + } + + [Test] + public void Contains_StabilityPointStructureEntityAdded_ReturnsTrue() + { + // Setup + var collector = new ReadConversionCollector(); + var entity = new StabilityPointStructureEntity(); + collector.Read(entity, new TestStabilityPointStructure()); + + // Call + var result = collector.Contains(entity); + + // Assert + Assert.IsTrue(result); + } + + [Test] + public void Contains_NoStabilityPointStructureEntityAdded_ReturnsFalse() + { + // Setup + var collector = new ReadConversionCollector(); + var entity = new StabilityPointStructureEntity(); + + // Call + var result = collector.Contains(entity); + + // Assert + Assert.IsFalse(result); + } + + [Test] + public void Contains_OtherStabilityPointStructureEntityAdded_ReturnsFalse() + { + // Setup + var collector = new ReadConversionCollector(); + var entity = new StabilityPointStructureEntity(); + collector.Read(new StabilityPointStructureEntity(), new TestStabilityPointStructure()); + + // Call + var result = collector.Contains(entity); + + // Assert + Assert.IsFalse(result); + } + + [Test] + public void Get_WithoutStabilityPointStructureEntity_ThrowsArgumentNullException() + { + // Setup + var collector = new ReadConversionCollector(); + + // Call + TestDelegate test = () => collector.Get((StabilityPointStructureEntity) null); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("entity", paramName); + } + + [Test] + public void Get_StabilityPointStructureEntityAdded_ReturnsHeightStructure() + { + // Setup + var collector = new ReadConversionCollector(); + StabilityPointStructure structure = new TestStabilityPointStructure(); + var entity = new StabilityPointStructureEntity(); + collector.Read(entity, structure); + + // Call + var result = collector.Get(entity); + + // Assert + Assert.AreSame(structure, result); + } + + [Test] + public void Get_NoStabilityPointStructureEntityAdded_ThrowsInvalidOperationException() + { + // Setup + var collector = new ReadConversionCollector(); + var entity = new StabilityPointStructureEntity(); + + // Call + TestDelegate test = () => collector.Get(entity); + + // Assert + Assert.Throws(test); + } + + [Test] + public void Get_OtherStabilityPointStructureEntityAdded_ThrowsInvalidOperationException() + { + // Setup + var collector = new ReadConversionCollector(); + var entity = new StabilityPointStructureEntity(); + collector.Read(new StabilityPointStructureEntity(), new TestStabilityPointStructure()); + + // Call + TestDelegate test = () => collector.Get(entity); + + // Assert + Assert.Throws(test); + } + + [Test] + public void Read_WithNullStabilityPointStructureEntity_ThrowsArgumentNullException() + { + // Setup + var collector = new ReadConversionCollector(); + + // Call + TestDelegate test = () => collector.Read(null, new TestStabilityPointStructure()); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("entity", paramName); + } + + [Test] + public void Read_WithNullStabilityPointStructureForStabilityPointStructureEntity_ThrowsArgumentNullException() + { + // Setup + var collector = new ReadConversionCollector(); + + // Call + TestDelegate test = () => collector.Read(new StabilityPointStructureEntity(), null); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("model", paramName); + } + + #endregion } } \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructureEntityReadExtensionsTest.cs =================================================================== diff -u --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructureEntityReadExtensionsTest.cs (revision 0) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructureEntityReadExtensionsTest.cs (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -0,0 +1,289 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Application.Ringtoets.Storage.DbContext; +using Application.Ringtoets.Storage.Read; +using Application.Ringtoets.Storage.Read.StabilityPointStructures; +using NUnit.Framework; +using Ringtoets.StabilityPointStructures.Data; +using Ringtoets.StabilityPointStructures.Data.TestUtil; + +namespace Application.Ringtoets.Storage.Test.Read.StabilityPointStructures +{ + [TestFixture] + public class StabilityPointStructureEntityReadExtensionsTest + { + [Test] + public void Read_ReadConversionCollectorNull_ThrowArgumentNullException() + { + // Setup + var entity = new StabilityPointStructureEntity(); + + // Call + TestDelegate call = () => entity.Read(null); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("collector", paramName); + } + + [Test] + public void Read_ValidEntity_ReturnStabilityPointStructure() + { + // Setup + var entity = new StabilityPointStructureEntity + { + Name = "A", + Id = "B", + X = 1.1, + Y = 2.2, + StructureNormalOrientation = 3.3, + StorageStructureAreaMean = 4.4, + StorageStructureAreaCoefficientOfVariation = 5.5, + AllowedLevelIncreaseStorageMean = 6.6, + AllowedLevelIncreaseStorage_StandardDeviation = 7.7, + WidthFlowAperturesMean = 8.8, + WidthFlowAperturesCoefficientOfVariation = 9.9, + InsideWaterLevelMean = 10.10, + InsideWaterLevelStandardDeviation = 11.11, + ThresholdHeightOpenWeirMean = 12.12, + ThresholdHeightOpenWeirStandardDeviation = 13.13, + CriticalOvertoppingDischargeMean = 14.14, + CriticalOvertoppingDischargeCoefficientOfVariation = 15.15, + FlowWidthAtBottomProtectionMean = 16.16, + FlowWidthAtBottomProtectionStandardDeviation = 17.17, + ConstructiveStrengthLinearLoadModelMean = 18.18, + ConstructiveStrengthLinearLoadModelCoefficientOfVariation = 19.19, + ConstructiveStrengthQuadraticLoadModelMean = 20.20, + ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation = 21.21, + BankWidthMean = 22.22, + BankWidthStandardDeviation = 23.23, + InsideWaterLevelFailureConstructionMean = 24.24, + InsideWaterLevelFailureConstructionStandardDeviation = 25.25, + EvaluationLevel = 26.26, + LevelCrestStructureMean = 27.27, + LevelCrestStructureStandardDeviation = 28.28, + VerticalDistance = 29.29, + FailureProbabilityRepairClosure = 30.30, + FailureCollisionEnergyMean = 31.31, + FailureCollisionEnergyCoefficientOfVariation = 32.32, + ShipMassMean = 33.33, + ShipMassCoefficientOfVariation = 34.34, + ShipVelocityMean = 35.35, + ShipVelocityCoefficientOfVariation = 36.36, + LevellingCount = 37, + ProbabilityCollisionSecondaryStructure = 38.38, + FlowVelocityStructureClosableMean = 39.39, + FlowVelocityStructureClosableStandardDeviation = 40.40, + StabilityLinearLoadModelMean = 41.41, + StabilityLinearLoadModelCoefficientOfVariation = 42.42, + StabilityQuadraticLoadModelMean = 43.43, + StabilityQuadraticLoadModelCoefficientOfVariation = 44.44, + AreaFlowAperturesMean = 45.45, + AreaFlowAperturesStandardDeviation = 46.46, + InflowModelType = Convert.ToByte(StabilityPointStructureInflowModelType.FloodedCulvert) + }; + + var collector = new ReadConversionCollector(); + + // Call + StabilityPointStructure structure = entity.Read(collector); + + // Assert + Assert.AreEqual(entity.Name, structure.Name); + Assert.AreEqual(entity.Id, structure.Id); + Assert.AreEqual(entity.X, structure.Location.X); + Assert.AreEqual(entity.Y, structure.Location.Y); + Assert.AreEqual(entity.StructureNormalOrientation, structure.StructureNormalOrientation.Value); + + Assert.AreEqual(entity.StorageStructureAreaMean, structure.StorageStructureArea.Mean.Value); + Assert.AreEqual(entity.StorageStructureAreaCoefficientOfVariation, structure.StorageStructureArea.CoefficientOfVariation.Value); + Assert.AreEqual(entity.AllowedLevelIncreaseStorageMean, structure.AllowedLevelIncreaseStorage.Mean.Value); + Assert.AreEqual(entity.AllowedLevelIncreaseStorage_StandardDeviation, structure.AllowedLevelIncreaseStorage.StandardDeviation.Value); + Assert.AreEqual(entity.WidthFlowAperturesMean, structure.WidthFlowApertures.Mean.Value); + Assert.AreEqual(entity.WidthFlowAperturesCoefficientOfVariation, structure.WidthFlowApertures.CoefficientOfVariation.Value); + Assert.AreEqual(entity.InsideWaterLevelMean, structure.InsideWaterLevel.Mean.Value); + Assert.AreEqual(entity.InsideWaterLevelStandardDeviation, structure.InsideWaterLevel.StandardDeviation.Value); + Assert.AreEqual(entity.ThresholdHeightOpenWeirMean, structure.ThresholdHeightOpenWeir.Mean.Value); + Assert.AreEqual(entity.ThresholdHeightOpenWeirStandardDeviation, structure.ThresholdHeightOpenWeir.StandardDeviation.Value); + Assert.AreEqual(entity.CriticalOvertoppingDischargeMean, structure.CriticalOvertoppingDischarge.Mean.Value); + Assert.AreEqual(entity.CriticalOvertoppingDischargeCoefficientOfVariation, structure.CriticalOvertoppingDischarge.CoefficientOfVariation.Value); + Assert.AreEqual(entity.FlowWidthAtBottomProtectionMean, structure.FlowWidthAtBottomProtection.Mean.Value); + Assert.AreEqual(entity.FlowWidthAtBottomProtectionStandardDeviation, structure.FlowWidthAtBottomProtection.StandardDeviation.Value); + Assert.AreEqual(entity.ConstructiveStrengthLinearLoadModelMean, structure.ConstructiveStrengthLinearLoadModel.Mean.Value); + Assert.AreEqual(entity.ConstructiveStrengthLinearLoadModelCoefficientOfVariation, structure.ConstructiveStrengthLinearLoadModel.CoefficientOfVariation.Value); + Assert.AreEqual(entity.ConstructiveStrengthQuadraticLoadModelMean, structure.ConstructiveStrengthQuadraticLoadModel.Mean.Value); + Assert.AreEqual(entity.ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation, structure.ConstructiveStrengthQuadraticLoadModel.CoefficientOfVariation.Value); + Assert.AreEqual(entity.BankWidthMean, structure.BankWidth.Mean.Value); + Assert.AreEqual(entity.BankWidthStandardDeviation, structure.BankWidth.StandardDeviation.Value); + Assert.AreEqual(entity.InsideWaterLevelFailureConstructionMean, structure.InsideWaterLevelFailureConstruction.Mean.Value); + Assert.AreEqual(entity.InsideWaterLevelFailureConstructionStandardDeviation, structure.InsideWaterLevelFailureConstruction.StandardDeviation.Value); + Assert.AreEqual(entity.EvaluationLevel, structure.EvaluationLevel.Value); + Assert.AreEqual(entity.LevelCrestStructureMean, structure.LevelCrestStructure.Mean.Value); + Assert.AreEqual(entity.LevelCrestStructureStandardDeviation, structure.LevelCrestStructure.StandardDeviation.Value); + Assert.AreEqual(entity.VerticalDistance, structure.VerticalDistance.Value); + Assert.AreEqual(entity.FailureProbabilityRepairClosure, structure.FailureProbabilityRepairClosure); + Assert.AreEqual(entity.FailureCollisionEnergyMean, structure.FailureCollisionEnergy.Mean.Value); + Assert.AreEqual(entity.FailureCollisionEnergyCoefficientOfVariation, structure.FailureCollisionEnergy.CoefficientOfVariation.Value); + Assert.AreEqual(entity.ShipMassMean, structure.ShipMass.Mean.Value); + Assert.AreEqual(entity.ShipMassCoefficientOfVariation, structure.ShipMass.CoefficientOfVariation.Value); + Assert.AreEqual(entity.ShipVelocityMean, structure.ShipVelocity.Mean.Value); + Assert.AreEqual(entity.ShipVelocityCoefficientOfVariation, structure.ShipVelocity.CoefficientOfVariation.Value); + Assert.AreEqual(entity.LevellingCount, structure.LevellingCount); + Assert.AreEqual(entity.ProbabilityCollisionSecondaryStructure, structure.ProbabilityCollisionSecondaryStructure); + Assert.AreEqual(entity.FlowVelocityStructureClosableMean, structure.FlowVelocityStructureClosable.Mean.Value); + Assert.AreEqual(entity.FlowVelocityStructureClosableStandardDeviation, structure.FlowVelocityStructureClosable.StandardDeviation.Value); + Assert.AreEqual(entity.StabilityLinearLoadModelMean, structure.StabilityLinearLoadModel.Mean.Value); + Assert.AreEqual(entity.StabilityLinearLoadModelCoefficientOfVariation, structure.StabilityLinearLoadModel.CoefficientOfVariation.Value); + Assert.AreEqual(entity.StabilityQuadraticLoadModelMean, structure.StabilityQuadraticLoadModel.Mean.Value); + Assert.AreEqual(entity.StabilityQuadraticLoadModelCoefficientOfVariation, structure.StabilityQuadraticLoadModel.CoefficientOfVariation.Value); + Assert.AreEqual(entity.AreaFlowAperturesMean, structure.AreaFlowApertures.Mean.Value); + Assert.AreEqual(entity.AreaFlowAperturesStandardDeviation, structure.AreaFlowApertures.StandardDeviation.Value); + Assert.AreEqual((StabilityPointStructureInflowModelType)entity.InflowModelType, structure.InflowModelType); + + Assert.IsTrue(collector.Contains(entity)); + } + + [Test] + public void Read_NullValues_ReturnStabilityPointStructureWithNaN() + { + // Setup + var entity = new StabilityPointStructureEntity + { + Name = "A", + Id = "B", + X = null, + Y = null, + StructureNormalOrientation = null, + StorageStructureAreaMean = null, + StorageStructureAreaCoefficientOfVariation = null, + AllowedLevelIncreaseStorageMean = null, + AllowedLevelIncreaseStorage_StandardDeviation = null, + WidthFlowAperturesMean = null, + WidthFlowAperturesCoefficientOfVariation = null, + InsideWaterLevelMean = null, + InsideWaterLevelStandardDeviation = null, + ThresholdHeightOpenWeirMean = null, + ThresholdHeightOpenWeirStandardDeviation = null, + CriticalOvertoppingDischargeMean = null, + CriticalOvertoppingDischargeCoefficientOfVariation = null, + FlowWidthAtBottomProtectionMean = null, + FlowWidthAtBottomProtectionStandardDeviation = null, + ConstructiveStrengthLinearLoadModelMean = null, + ConstructiveStrengthLinearLoadModelCoefficientOfVariation = null, + ConstructiveStrengthQuadraticLoadModelMean = null, + ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation = null, + BankWidthMean = null, + BankWidthStandardDeviation = null, + InsideWaterLevelFailureConstructionMean = null, + InsideWaterLevelFailureConstructionStandardDeviation = null, + EvaluationLevel = null, + LevelCrestStructureMean = null, + LevelCrestStructureStandardDeviation = null, + VerticalDistance = null, + FailureProbabilityRepairClosure = null, + FailureCollisionEnergyMean = null, + FailureCollisionEnergyCoefficientOfVariation = null, + ShipMassMean = null, + ShipMassCoefficientOfVariation = null, + ShipVelocityMean = null, + ShipVelocityCoefficientOfVariation = null, + ProbabilityCollisionSecondaryStructure = null, + FlowVelocityStructureClosableMean = null, + FlowVelocityStructureClosableStandardDeviation = null, + StabilityLinearLoadModelMean = null, + StabilityLinearLoadModelCoefficientOfVariation = null, + AreaFlowAperturesMean = null, + AreaFlowAperturesStandardDeviation = null + }; + + var collector = new ReadConversionCollector(); + + // Call + StabilityPointStructure structure = entity.Read(collector); + + // Assert + Assert.IsNaN(structure.Location.X); + Assert.IsNaN(structure.Location.Y); + Assert.IsNaN(structure.StructureNormalOrientation); + + Assert.IsNaN(structure.StorageStructureArea.Mean); + Assert.IsNaN(structure.StorageStructureArea.CoefficientOfVariation); + Assert.IsNaN(structure.AllowedLevelIncreaseStorage.Mean); + Assert.IsNaN(structure.AllowedLevelIncreaseStorage.StandardDeviation); + Assert.IsNaN(structure.WidthFlowApertures.Mean); + Assert.IsNaN(structure.WidthFlowApertures.CoefficientOfVariation); + Assert.IsNaN(structure.InsideWaterLevel.Mean); + Assert.IsNaN(structure.InsideWaterLevel.StandardDeviation); + Assert.IsNaN(structure.ThresholdHeightOpenWeir.Mean); + Assert.IsNaN(structure.ThresholdHeightOpenWeir.StandardDeviation); + Assert.IsNaN(structure.CriticalOvertoppingDischarge.Mean); + Assert.IsNaN(structure.CriticalOvertoppingDischarge.CoefficientOfVariation); + Assert.IsNaN(structure.FlowWidthAtBottomProtection.Mean); + Assert.IsNaN(structure.FlowWidthAtBottomProtection.StandardDeviation); + Assert.IsNaN(structure.ConstructiveStrengthLinearLoadModel.Mean); + Assert.IsNaN(structure.ConstructiveStrengthLinearLoadModel.CoefficientOfVariation); + Assert.IsNaN(structure.ConstructiveStrengthQuadraticLoadModel.Mean); + Assert.IsNaN(structure.ConstructiveStrengthQuadraticLoadModel.CoefficientOfVariation); + Assert.IsNaN(structure.BankWidth.Mean); + Assert.IsNaN(structure.BankWidth.StandardDeviation); + Assert.IsNaN(structure.InsideWaterLevelFailureConstruction.Mean); + Assert.IsNaN(structure.InsideWaterLevelFailureConstruction.StandardDeviation); + Assert.IsNaN(structure.EvaluationLevel); + Assert.IsNaN(structure.LevelCrestStructure.Mean); + Assert.IsNaN(structure.LevelCrestStructure.StandardDeviation); + Assert.IsNaN(structure.VerticalDistance); + Assert.IsNaN(structure.FailureProbabilityRepairClosure); + Assert.IsNaN(structure.FailureCollisionEnergy.Mean); + Assert.IsNaN(structure.FailureCollisionEnergy.CoefficientOfVariation); + Assert.IsNaN(structure.ShipMass.Mean); + Assert.IsNaN(structure.ShipMass.CoefficientOfVariation); + Assert.IsNaN(structure.ShipVelocity.Mean); + Assert.IsNaN(structure.ShipVelocity.CoefficientOfVariation); + Assert.IsNaN(structure.ProbabilityCollisionSecondaryStructure); + Assert.IsNaN(structure.FlowVelocityStructureClosable.Mean); + Assert.IsNaN(structure.FlowVelocityStructureClosable.StandardDeviation); + Assert.IsNaN(structure.StabilityLinearLoadModel.Mean); + Assert.IsNaN(structure.StabilityLinearLoadModel.CoefficientOfVariation); + Assert.IsNaN(structure.StabilityQuadraticLoadModel.Mean); + Assert.IsNaN(structure.StabilityQuadraticLoadModel.CoefficientOfVariation); + Assert.IsNaN(structure.AreaFlowApertures.Mean); + Assert.IsNaN(structure.AreaFlowApertures.StandardDeviation); + } + + [Test] + public void Read_EntityRegistered_ReturnRegisteredStructure() + { + // Setup + var entity = new StabilityPointStructureEntity(); + StabilityPointStructure registeredStructure = new TestStabilityPointStructure(); + var collector = new ReadConversionCollector(); + collector.Read(entity, registeredStructure); + + // Call + StabilityPointStructure readStructure = entity.Read(collector); + + // Assert + Assert.AreSame(registeredStructure, readStructure); + } + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Base/Data/RoundedDouble.cs =================================================================== diff -u -r24da3aa72ccc0776599628c9f971081694048d9a -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Core/Common/src/Core.Common.Base/Data/RoundedDouble.cs (.../RoundedDouble.cs) (revision 24da3aa72ccc0776599628c9f971081694048d9a) +++ Core/Common/src/Core.Common.Base/Data/RoundedDouble.cs (.../RoundedDouble.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -39,6 +39,12 @@ /// public const int MaximumNumberOfDecimalPlaces = 15; + /// + /// Represents a value that is not a number (NaN). This field is constant. + /// + /// + public readonly static RoundedDouble NaN = new RoundedDouble(MaximumNumberOfDecimalPlaces, double.NaN); + private readonly double value; private readonly int numberOfDecimalPlaces; Index: Core/Common/test/Core.Common.Base.Test/Data/RoundedDoubleTest.cs =================================================================== diff -u -r24da3aa72ccc0776599628c9f971081694048d9a -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Core/Common/test/Core.Common.Base.Test/Data/RoundedDoubleTest.cs (.../RoundedDoubleTest.cs) (revision 24da3aa72ccc0776599628c9f971081694048d9a) +++ Core/Common/test/Core.Common.Base.Test/Data/RoundedDoubleTest.cs (.../RoundedDoubleTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -114,6 +114,14 @@ } [Test] + public void NaN_ExpectedValue() + { + // Assert + Assert.IsNaN(RoundedDouble.NaN.Value); + Assert.AreEqual(RoundedDouble.MaximumNumberOfDecimalPlaces, RoundedDouble.NaN.NumberOfDecimalPlaces); + } + + [Test] [TestCase(1.0, 2, 1.00)] [TestCase(123456789.0, 3, 123456789.000)] [TestCase(12345678.90, 2, 12345678.90)] Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresInput.cs =================================================================== diff -u -r1a6804681b0758a5761e39099e4b6de65f9cf4a2 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresInput.cs (.../ClosingStructuresInput.cs) (revision 1a6804681b0758a5761e39099e4b6de65f9cf4a2) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructuresInput.cs (.../ClosingStructuresInput.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -57,7 +57,7 @@ thresholdHeightOpenWeir = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; @@ -69,19 +69,19 @@ areaFlowApertures = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.01 }; levelCrestStructureNotClosing = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.05 }; insideWaterLevel = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; } Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresInputTest.cs =================================================================== diff -u -r1a6804681b0758a5761e39099e4b6de65f9cf4a2 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresInputTest.cs (.../ClosingStructuresInputTest.cs) (revision 1a6804681b0758a5761e39099e4b6de65f9cf4a2) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructuresInputTest.cs (.../ClosingStructuresInputTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -39,7 +39,7 @@ // Setup var insideWaterLevel = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; @@ -51,19 +51,19 @@ var thresholdHeightOpenWeir = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; var areaFlowApertures = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.01 }; var levelCrestStructureNotClosing = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.05 }; Index: Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismSectionResult.cs =================================================================== diff -u -r673e35de0df920529e5dda63ea8b4dfb08ed65a8 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismSectionResult.cs (.../FailureMechanismSectionResult.cs) (revision 673e35de0df920529e5dda63ea8b4dfb08ed65a8) +++ Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismSectionResult.cs (.../FailureMechanismSectionResult.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -42,7 +42,7 @@ throw new ArgumentNullException("section"); } Section = section; - AssessmentLayerThree = (RoundedDouble)double.NaN; + AssessmentLayerThree = RoundedDouble.NaN; } /// Index: Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresInputBase.cs =================================================================== diff -u -r50e7c9ffa6c528abd1a1ee61784f78d5983465fe -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresInputBase.cs (.../StructuresInputBase.cs) (revision 50e7c9ffa6c528abd1a1ee61784f78d5983465fe) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresInputBase.cs (.../StructuresInputBase.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -68,33 +68,33 @@ allowedLevelIncreaseStorage = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; storageStructureArea = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.1 }; flowWidthAtBottomProtection = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.05 }; criticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.15 }; failureProbabilityStructureWithErosion = 0; widthFlowApertures = new VariationCoefficientNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.05 }; Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseBreakWaterProperties.cs =================================================================== diff -u -r5e9769061c2802f1182ed502e2a32581cfb68196 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseBreakWaterProperties.cs (.../UseBreakWaterProperties.cs) (revision 5e9769061c2802f1182ed502e2a32581cfb68196) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseBreakWaterProperties.cs (.../UseBreakWaterProperties.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -107,7 +107,7 @@ { return data.BreakWater.Height; } - return (RoundedDouble) double.NaN; + return RoundedDouble.NaN; } set { Index: Ringtoets/Common/src/Ringtoets.Common.Forms/TypeConverters/NoValueRoundedDoubleConverter.cs =================================================================== diff -u -r5bdb5ecc12d8c8e7ef49b63f0a40dfbdd2532d54 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Common/src/Ringtoets.Common.Forms/TypeConverters/NoValueRoundedDoubleConverter.cs (.../NoValueRoundedDoubleConverter.cs) (revision 5bdb5ecc12d8c8e7ef49b63f0a40dfbdd2532d54) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/TypeConverters/NoValueRoundedDoubleConverter.cs (.../NoValueRoundedDoubleConverter.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -42,7 +42,7 @@ { if (string.IsNullOrWhiteSpace(text) || text.Trim() == Resources.RoundedRouble_No_result_dash) { - return (RoundedDouble) double.NaN; + return RoundedDouble.NaN; } } return base.ConvertFrom(context, culture, value); Index: Ringtoets/Common/src/Ringtoets.Common.Service/RingtoetsCommonDataSynchronizationService.cs =================================================================== diff -u -rce190360da30edf73fb464cc0fea1d9a795aa5d4 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Common/src/Ringtoets.Common.Service/RingtoetsCommonDataSynchronizationService.cs (.../RingtoetsCommonDataSynchronizationService.cs) (revision ce190360da30edf73fb464cc0fea1d9a795aa5d4) +++ Ringtoets/Common/src/Ringtoets.Common.Service/RingtoetsCommonDataSynchronizationService.cs (.../RingtoetsCommonDataSynchronizationService.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -45,7 +45,7 @@ throw new ArgumentNullException("location"); } - location.DesignWaterLevel = (RoundedDouble) double.NaN; + location.DesignWaterLevel = RoundedDouble.NaN; } /// @@ -63,7 +63,7 @@ throw new ArgumentNullException("location"); } - location.WaveHeight = (RoundedDouble) double.NaN; + location.WaveHeight = RoundedDouble.NaN; } } } \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresInputBaseTest.cs =================================================================== diff -u -r50e7c9ffa6c528abd1a1ee61784f78d5983465fe -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresInputBaseTest.cs (.../StructuresInputBaseTest.cs) (revision 50e7c9ffa6c528abd1a1ee61784f78d5983465fe) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresInputBaseTest.cs (.../StructuresInputBaseTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -50,31 +50,31 @@ var allowedLevelIncreaseStorage = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; var storageStructureArea = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.1 }; var flowWidthAtBottomProtection = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.05 }; var criticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.15 }; var widthFlowApertures = new VariationCoefficientNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.05 }; Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs =================================================================== diff -u -r7d6e4c28a40fb056c182d0691dda2b2e88aeebfd -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs (.../UseBreakWaterPropertiesTest.cs) (revision 7d6e4c28a40fb056c182d0691dda2b2e88aeebfd) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs (.../UseBreakWaterPropertiesTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -47,7 +47,7 @@ // Assert Assert.IsFalse(properties.UseBreakWater); Assert.IsNull(properties.BreakWaterType); - Assert.AreEqual((RoundedDouble) double.NaN, properties.BreakWaterHeight); + Assert.AreEqual(RoundedDouble.NaN, properties.BreakWaterHeight); Assert.AreEqual(string.Empty, properties.ToString()); } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TypeConverters/NoValueRoundedDoubleConverterTest.cs =================================================================== diff -u -r5bdb5ecc12d8c8e7ef49b63f0a40dfbdd2532d54 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TypeConverters/NoValueRoundedDoubleConverterTest.cs (.../NoValueRoundedDoubleConverterTest.cs) (revision 5bdb5ecc12d8c8e7ef49b63f0a40dfbdd2532d54) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TypeConverters/NoValueRoundedDoubleConverterTest.cs (.../NoValueRoundedDoubleConverterTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -129,7 +129,7 @@ var converter = new NoValueRoundedDoubleConverter(); // Call - var text = (string) converter.ConvertTo((RoundedDouble) double.NaN, typeof(string)); + var text = (string) converter.ConvertTo(RoundedDouble.NaN, typeof(string)); // Assert Assert.AreEqual("-", text); Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsInput.cs =================================================================== diff -u -r7d4fdb527410c89577828ea5d84896945341bae8 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsInput.cs (.../GrassCoverErosionInwardsInput.cs) (revision 7d4fdb527410c89577828ea5d84896945341bae8) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsInput.cs (.../GrassCoverErosionInwardsInput.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -177,7 +177,7 @@ { if (dikeProfile == null) { - Orientation = (RoundedDouble) double.NaN; + Orientation = RoundedDouble.NaN; UseForeshore = false; UseBreakWater = false; BreakWater = GetDefaultBreakWater(); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsChartDataPointsFactoryTest.cs =================================================================== diff -u -r30b8231f92b90ea4b05e98e3d0285368f6dfe2e4 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsChartDataPointsFactoryTest.cs (.../GrassCoverErosionInwardsChartDataPointsFactoryTest.cs) (revision 30b8231f92b90ea4b05e98e3d0285368f6dfe2e4) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsChartDataPointsFactoryTest.cs (.../GrassCoverErosionInwardsChartDataPointsFactoryTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -166,7 +166,7 @@ new Point2D[0], null, new DikeProfile.ConstructionProperties()), - DikeHeight = (RoundedDouble) double.NaN + DikeHeight = RoundedDouble.NaN }; // Call Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs =================================================================== diff -u -r7d4fdb527410c89577828ea5d84896945341bae8 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision 7d4fdb527410c89577828ea5d84896945341bae8) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -266,7 +266,7 @@ DikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], null, new DikeProfile.ConstructionProperties() { - Orientation = (RoundedDouble) double.NaN + Orientation = RoundedDouble.NaN }) } }; Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Service/GrassCoverErosionOutwardsDataSynchronizationService.cs =================================================================== diff -u -rc96cfd7d2d167db3b0775f7d76f320c5e582ae27 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Service/GrassCoverErosionOutwardsDataSynchronizationService.cs (.../GrassCoverErosionOutwardsDataSynchronizationService.cs) (revision c96cfd7d2d167db3b0775f7d76f320c5e582ae27) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Service/GrassCoverErosionOutwardsDataSynchronizationService.cs (.../GrassCoverErosionOutwardsDataSynchronizationService.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -71,8 +71,8 @@ !double.IsNaN(location.DesignWaterLevel) || !double.IsNaN(location.WaveHeight))) { - location.DesignWaterLevel = (RoundedDouble) double.NaN; - location.WaveHeight = (RoundedDouble) double.NaN; + location.DesignWaterLevel = RoundedDouble.NaN; + location.WaveHeight = RoundedDouble.NaN; location.DesignWaterLevelCalculationConvergence = CalculationConvergence.NotCalculated; location.WaveHeightCalculationConvergence = CalculationConvergence.NotCalculated; locationsAffected = true; Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -258,7 +258,7 @@ Assert.AreEqual(1.23.ToString(CultureInfo.CurrentCulture), rows[1].Cells[locationDesignWaterlevelColumnIndex].FormattedValue); Assert.AreEqual("-", rows[2].Cells[locationDesignWaterlevelColumnIndex].FormattedValue); - locations.ForEach(loc => loc.DesignWaterLevel = (RoundedDouble) double.NaN); + locations.ForEach(loc => loc.DesignWaterLevel = RoundedDouble.NaN); // Call locations.NotifyObservers(); Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -255,7 +255,7 @@ Assert.AreEqual("-", rows[2].Cells[locationWaveHeightColumnIndex].FormattedValue); // Call - locations.ForEach(loc => loc.WaveHeight = (RoundedDouble) double.NaN); + locations.ForEach(loc => loc.WaveHeight = RoundedDouble.NaN); locations.NotifyObservers(); // Assert Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs =================================================================== diff -u -r87b3dec8abf9077375a10deb16d508d9cc2711e4 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs) (revision 87b3dec8abf9077375a10deb16d508d9cc2711e4) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -161,7 +161,7 @@ { // Setup GrassCoverErosionOutwardsWaveConditionsCalculation calculation = GetDefaultCalculation(); - calculation.InputParameters.HydraulicBoundaryLocation.DesignWaterLevel = (RoundedDouble)double.NaN; + calculation.InputParameters.HydraulicBoundaryLocation.DesignWaterLevel = RoundedDouble.NaN; var isValid = true; Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs =================================================================== diff -u -r1a6804681b0758a5761e39099e4b6de65f9cf4a2 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs (.../HeightStructuresInput.cs) (revision 1a6804681b0758a5761e39099e4b6de65f9cf4a2) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs (.../HeightStructuresInput.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -42,7 +42,7 @@ { levelCrestStructure = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.05 }; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs =================================================================== diff -u -r1a6804681b0758a5761e39099e4b6de65f9cf4a2 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs (.../HeightStructuresInputTest.cs) (revision 1a6804681b0758a5761e39099e4b6de65f9cf4a2) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs (.../HeightStructuresInputTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -39,7 +39,7 @@ // Setup var levelCrestStructure = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.05 }; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs =================================================================== diff -u -r3507fb0dc4848167faeb5a7cb4d1b01a7b78e98b -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs (.../HeightStructuresCalculationActivityIntegrationTest.cs) (revision 3507fb0dc4848167faeb5a7cb4d1b01a7b78e98b) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs (.../HeightStructuresCalculationActivityIntegrationTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -205,7 +205,7 @@ Structure = new TestHeightStructure() } }; - calculation.InputParameters.DeviationWaveDirection = (RoundedDouble) double.NaN; + calculation.InputParameters.DeviationWaveDirection = RoundedDouble.NaN; var activity = new HeightStructuresCalculationActivity(calculation, testDataPath, failureMechanism, assessmentSection); @@ -252,7 +252,7 @@ Structure = new TestHeightStructure() } }; - calculation.InputParameters.StructureNormalOrientation = (RoundedDouble) double.NaN; + calculation.InputParameters.StructureNormalOrientation = RoundedDouble.NaN; var activity = new HeightStructuresCalculationActivity(calculation, testDataPath, failureMechanism, assessmentSection); // Call Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs =================================================================== diff -u -r3507fb0dc4848167faeb5a7cb4d1b01a7b78e98b -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision 3507fb0dc4848167faeb5a7cb4d1b01a7b78e98b) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -191,7 +191,7 @@ } }; - calculation.InputParameters.DeviationWaveDirection = (RoundedDouble) double.NaN; + calculation.InputParameters.DeviationWaveDirection = RoundedDouble.NaN; // Call bool isValid = false; @@ -234,7 +234,7 @@ } }; - calculation.InputParameters.StructureNormalOrientation = (RoundedDouble) double.NaN; + calculation.InputParameters.StructureNormalOrientation = RoundedDouble.NaN; // Call bool isValid = false; Index: Ringtoets/Integration/src/Ringtoets.Integration.Service/RingtoetsDataSynchronizationService.cs =================================================================== diff -u -rc96cfd7d2d167db3b0775f7d76f320c5e582ae27 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Integration/src/Ringtoets.Integration.Service/RingtoetsDataSynchronizationService.cs (.../RingtoetsDataSynchronizationService.cs) (revision c96cfd7d2d167db3b0775f7d76f320c5e582ae27) +++ Ringtoets/Integration/src/Ringtoets.Integration.Service/RingtoetsDataSynchronizationService.cs (.../RingtoetsDataSynchronizationService.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -165,8 +165,8 @@ !double.IsNaN(hydraulicBoundaryLocation.DesignWaterLevel) || !double.IsNaN(hydraulicBoundaryLocation.WaveHeight))) { - hydraulicBoundaryLocation.DesignWaterLevel = (RoundedDouble) double.NaN; - hydraulicBoundaryLocation.WaveHeight = (RoundedDouble) double.NaN; + hydraulicBoundaryLocation.DesignWaterLevel = RoundedDouble.NaN; + hydraulicBoundaryLocation.WaveHeight = RoundedDouble.NaN; hydraulicBoundaryLocation.DesignWaterLevelCalculationConvergence = CalculationConvergence.NotCalculated; hydraulicBoundaryLocation.WaveHeightCalculationConvergence = CalculationConvergence.NotCalculated; locationsAffected = true; Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -r94c00eb5839a1f1e96ebfe0d5c62f40e1d0ef500 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 94c00eb5839a1f1e96ebfe0d5c62f40e1d0ef500) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -228,7 +228,7 @@ Assert.AreEqual("-", rows[2].Cells[locationDesignWaterlevelColumnIndex].FormattedValue); // Call - assessmentSection.HydraulicBoundaryDatabase.Locations.ForEach(loc => loc.DesignWaterLevel = (RoundedDouble) double.NaN); + assessmentSection.HydraulicBoundaryDatabase.Locations.ForEach(loc => loc.DesignWaterLevel = RoundedDouble.NaN); assessmentSection.NotifyObservers(); // Assert Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs =================================================================== diff -u -r94c00eb5839a1f1e96ebfe0d5c62f40e1d0ef500 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 94c00eb5839a1f1e96ebfe0d5c62f40e1d0ef500) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -221,7 +221,7 @@ Assert.AreEqual("-", rows[2].Cells[locationWaveHeightColumnIndex].FormattedValue); // Call - assessmentSection.HydraulicBoundaryDatabase.Locations.ForEach(loc => loc.WaveHeight = (RoundedDouble) double.NaN); + assessmentSection.HydraulicBoundaryDatabase.Locations.ForEach(loc => loc.WaveHeight = RoundedDouble.NaN); assessmentSection.NotifyObservers(); // Assert Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/DerivedPipingInput.cs =================================================================== diff -u -r1a74778bb0981ce2bcc6ca7aba097831365bbb24 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Piping/src/Ringtoets.Piping.Data/DerivedPipingInput.cs (.../DerivedPipingInput.cs) (revision 1a74778bb0981ce2bcc6ca7aba097831365bbb24) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/DerivedPipingInput.cs (.../DerivedPipingInput.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -110,7 +110,7 @@ { LogNormalDistribution thicknessCoverageLayer = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.5 }; UpdateThicknessCoverageLayerMean(thicknessCoverageLayer); @@ -129,7 +129,7 @@ { LogNormalDistribution thicknessAquiferLayer = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.5 }; UpdateThicknessAquiferLayerMean(thicknessAquiferLayer); @@ -148,8 +148,8 @@ { var distribution = new LogNormalDistribution(6) { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }; UpdateDiameterD70Parameters(distribution); @@ -167,8 +167,8 @@ { var distribution = new LogNormalDistribution(6) { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }; UpdateDarcyPermeabilityParameters(distribution); @@ -185,9 +185,9 @@ { var distribution = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN, - Shift = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN, + Shift = RoundedDouble.NaN }; UpdateSaturatedVolumicWeightOfCoverageLayerParameters(distribution); Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs =================================================================== diff -u -rf4c9e0545d96afcd7738cc9493dfa57222baab44 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs (.../PipingInput.cs) (revision f4c9e0545d96afcd7738cc9493dfa57222baab44) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs (.../PipingInput.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -204,7 +204,7 @@ { if (SurfaceLine == null) { - ExitPointL = (RoundedDouble) double.NaN; + ExitPointL = RoundedDouble.NaN; } else { Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs =================================================================== diff -u -r99f3b343f5ac4aed453d9f6d291217de76ef5314 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs (.../DerivedPipingInputTest.cs) (revision 99f3b343f5ac4aed453d9f6d291217de76ef5314) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs (.../DerivedPipingInputTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -298,7 +298,7 @@ { // Setup var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); - input.ExitPointL = (RoundedDouble) double.NaN; + input.ExitPointL = RoundedDouble.NaN; var derivedInput = new DerivedPipingInput(input); // Call @@ -511,7 +511,7 @@ { // Setup var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); - input.EntryPointL = (RoundedDouble) double.NaN; + input.EntryPointL = RoundedDouble.NaN; var derivedInput = new DerivedPipingInput(input); // Call @@ -527,7 +527,7 @@ { // Setup var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); - input.ExitPointL = (RoundedDouble) double.NaN; + input.ExitPointL = RoundedDouble.NaN; var derivedInput = new DerivedPipingInput(input); // Call @@ -595,7 +595,7 @@ // Setup var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); - input.ExitPointL = (RoundedDouble) double.NaN; + input.ExitPointL = RoundedDouble.NaN; // Call var result = derivedInput.SaturatedVolumicWeightOfCoverageLayer; @@ -955,7 +955,7 @@ // Setup var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); - input.ExitPointL = (RoundedDouble) double.NaN; + input.ExitPointL = RoundedDouble.NaN; // Call var result = derivedInput.DarcyPermeability; @@ -1097,7 +1097,7 @@ // Setup var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); - input.ExitPointL = (RoundedDouble) double.NaN; + input.ExitPointL = RoundedDouble.NaN; // Call var result = derivedInput.DiameterD70; Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs =================================================================== diff -u -rd859a8308857ce1bf82ff94356a30363213c6ff6 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision d859a8308857ce1bf82ff94356a30363213c6ff6) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -58,38 +58,38 @@ var diameter70 = new LogNormalDistribution(6) { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }; var darcyPermeability = new LogNormalDistribution(6) { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }; var thicknessCoverageLayer = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.5 }; var saturatedVolumicWeightOfCoverageLayer = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }; var thicknessAquiferLayer = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.5 }; var seepageLength = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }; GeneralPipingInput generalInputParameters = new GeneralPipingInput(); @@ -198,7 +198,7 @@ { // Setup PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); - input.EntryPointL = (RoundedDouble) double.NaN; + input.EntryPointL = RoundedDouble.NaN; // Call TestDelegate call = () => input.ExitPointL = (RoundedDouble) value; @@ -217,7 +217,7 @@ { // Setup PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); - input.EntryPointL = (RoundedDouble) double.NaN; + input.EntryPointL = RoundedDouble.NaN; int originalNumberOfDecimalPlaces = input.ExitPointL.NumberOfDecimalPlaces; @@ -257,7 +257,7 @@ { // Setup PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); - input.ExitPointL = (RoundedDouble) double.NaN; + input.ExitPointL = RoundedDouble.NaN; // Call TestDelegate call = () => input.EntryPointL = (RoundedDouble) value; @@ -276,7 +276,7 @@ { // Setup PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); - input.ExitPointL = (RoundedDouble) double.NaN; + input.ExitPointL = RoundedDouble.NaN; int originalNumberOfDecimalPlaces = input.EntryPointL.NumberOfDecimalPlaces; @@ -555,7 +555,7 @@ { // Setup PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); - input.ExitPointL = (RoundedDouble) double.NaN; + input.ExitPointL = RoundedDouble.NaN; // Call LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; @@ -768,7 +768,7 @@ { // Setup PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); - input.EntryPointL = (RoundedDouble) double.NaN; + input.EntryPointL = RoundedDouble.NaN; // Call LogNormalDistribution seepageLength = input.SeepageLength; @@ -783,7 +783,7 @@ { // Setup PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); - input.ExitPointL = (RoundedDouble) double.NaN; + input.ExitPointL = RoundedDouble.NaN; // Call LogNormalDistribution seepageLength = input.SeepageLength; Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingCalculationScenarioFactory.cs =================================================================== diff -u -rae09732abad92d670274d8661856965b59021cd5 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingCalculationScenarioFactory.cs (.../PipingCalculationScenarioFactory.cs) (revision ae09732abad92d670274d8661856965b59021cd5) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingCalculationScenarioFactory.cs (.../PipingCalculationScenarioFactory.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -78,7 +78,7 @@ /// A new . public static PipingCalculationScenario CreateFailedPipingCalculationScenario(FailureMechanismSection section) { - return CreatePipingCalculationScenario((RoundedDouble) double.NaN, section); + return CreatePipingCalculationScenario(RoundedDouble.NaN, section); } /// Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs =================================================================== diff -u -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -701,7 +701,7 @@ string testName = "TestName"; HydraulicBoundaryLocation hydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, testName, 0, 0) { - DesignWaterLevel = (RoundedDouble) double.NaN + DesignWaterLevel = RoundedDouble.NaN }; // Call Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingChartDataPointsFactoryTest.cs =================================================================== diff -u -rac2a8327f9ce8b42d2e2740a0cda030385c5c63c -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingChartDataPointsFactoryTest.cs (.../PipingChartDataPointsFactoryTest.cs) (revision ac2a8327f9ce8b42d2e2740a0cda030385c5c63c) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingChartDataPointsFactoryTest.cs (.../PipingChartDataPointsFactoryTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -90,7 +90,7 @@ var pipingInput = new PipingInput(new GeneralPipingInput()) { SurfaceLine = GetSurfaceLineWithGeometry(), - EntryPointL = (RoundedDouble) double.NaN + EntryPointL = RoundedDouble.NaN }; // Call @@ -154,7 +154,7 @@ var pipingInput = new PipingInput(new GeneralPipingInput()) { SurfaceLine = GetSurfaceLineWithGeometry(), - ExitPointL = (RoundedDouble) double.NaN + ExitPointL = RoundedDouble.NaN }; // Call Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs =================================================================== diff -u -r46f1eb89e0553eb1a8ece85c08167f472d1fb66c -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs (.../PipingCalculationServiceTest.cs) (revision 46f1eb89e0553eb1a8ece85c08167f472d1fb66c) +++ Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs (.../PipingCalculationServiceTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -138,7 +138,7 @@ const string name = ""; PipingCalculation calculation = PipingCalculationFactory.CreateCalculationWithValidInput(); - calculation.InputParameters.HydraulicBoundaryLocation.DesignWaterLevel = (RoundedDouble) double.NaN; + calculation.InputParameters.HydraulicBoundaryLocation.DesignWaterLevel = RoundedDouble.NaN; calculation.Name = name; // Call @@ -165,7 +165,7 @@ const string name = ""; PipingCalculation calculation = PipingCalculationFactory.CreateCalculationWithValidInput(); - calculation.InputParameters.EntryPointL = (RoundedDouble) double.NaN; + calculation.InputParameters.EntryPointL = RoundedDouble.NaN; calculation.Name = name; // Call @@ -191,7 +191,7 @@ const string name = ""; PipingCalculation calculation = PipingCalculationFactory.CreateCalculationWithValidInput(); - calculation.InputParameters.ExitPointL = (RoundedDouble) double.NaN; + calculation.InputParameters.ExitPointL = RoundedDouble.NaN; calculation.Name = name; // Call Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Data/WaveConditionsInput.cs =================================================================== diff -u -rbcaf65d1f53f270fba046eaa396d3be77bd08c0f -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/Revetment/src/Ringtoets.Revetment.Data/WaveConditionsInput.cs (.../WaveConditionsInput.cs) (revision bcaf65d1f53f270fba046eaa396d3be77bd08c0f) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Data/WaveConditionsInput.cs (.../WaveConditionsInput.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -347,7 +347,7 @@ { if (foreshoreProfile == null) { - Orientation = (RoundedDouble) double.NaN; + Orientation = RoundedDouble.NaN; UseForeshore = false; UseBreakWater = false; BreakWater = GetDefaultBreakWater(); Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresInput.cs =================================================================== diff -u -r4c587b49b8dc025f24620d47fb24d42779ef98fd -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresInput.cs (.../StabilityPointStructuresInput.cs) (revision 4c587b49b8dc025f24620d47fb24d42779ef98fd) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresInput.cs (.../StabilityPointStructuresInput.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -68,13 +68,13 @@ insideWaterLevelFailureConstruction = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; insideWaterLevel = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; @@ -86,74 +86,74 @@ flowVelocityStructureClosable = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 1 }; levelCrestStructure = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.05 }; thresholdHeightOpenWeir = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; areaFlowApertures = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.01 }; constructiveStrengthLinearLoadModel = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.1 }; constructiveStrengthQuadraticLoadModel = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.1 }; stabilityLinearLoadModel = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.1 }; stabilityQuadraticLoadModel = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.1 }; failureCollisionEnergy = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.3 }; shipMass = new VariationCoefficientNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.2 }; shipVelocity = new VariationCoefficientNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.2 }; bankWidth = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }; } Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresInputTest.cs =================================================================== diff -u -r4c587b49b8dc025f24620d47fb24d42779ef98fd -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresInputTest.cs (.../StabilityPointStructuresInputTest.cs) (revision 4c587b49b8dc025f24620d47fb24d42779ef98fd) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.Test/StabilityPointStructuresInputTest.cs (.../StabilityPointStructuresInputTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -39,13 +39,13 @@ // Setup var insideWaterLevelFailureConstruction = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; var insideWaterLevel = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; @@ -57,74 +57,74 @@ var flowVelocityStructureClosable = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 1 }; var levelCrestStructure = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.05 }; var thresholdHeightOpenWeir = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.1 }; var areaFlowApertures = new LogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, StandardDeviation = (RoundedDouble) 0.01 }; var constructiveStrengthLinearLoadModel = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.1 }; var constructiveStrengthQuadraticLoadModel = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.1 }; var stabilityLinearLoadModel = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.1 }; var stabilityQuadraticLoadModel = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.1 }; var failureCollisionEnergy = new VariationCoefficientLogNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.3 }; var shipMass = new VariationCoefficientNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.2 }; var shipVelocity = new VariationCoefficientNormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, + Mean = RoundedDouble.NaN, CoefficientOfVariation = (RoundedDouble) 0.2 }; var bankWidth = new NormalDistribution(2) { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) double.NaN + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN }; // Call Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Service.Test/StabilityStoneCoverWaveConditionsCalculationServiceTest.cs =================================================================== diff -u -r87b3dec8abf9077375a10deb16d508d9cc2711e4 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Service.Test/StabilityStoneCoverWaveConditionsCalculationServiceTest.cs (.../StabilityStoneCoverWaveConditionsCalculationServiceTest.cs) (revision 87b3dec8abf9077375a10deb16d508d9cc2711e4) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Service.Test/StabilityStoneCoverWaveConditionsCalculationServiceTest.cs (.../StabilityStoneCoverWaveConditionsCalculationServiceTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -142,7 +142,7 @@ { // Setup StabilityStoneCoverWaveConditionsCalculation calculation = GetDefaultCalculation(); - calculation.InputParameters.HydraulicBoundaryLocation.DesignWaterLevel = (RoundedDouble) double.NaN; + calculation.InputParameters.HydraulicBoundaryLocation.DesignWaterLevel = RoundedDouble.NaN; var isValid = true; Index: Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Data/WaveImpactAsphaltCoverFailureMechanismSectionResult.cs =================================================================== diff -u -r673e35de0df920529e5dda63ea8b4dfb08ed65a8 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Data/WaveImpactAsphaltCoverFailureMechanismSectionResult.cs (.../WaveImpactAsphaltCoverFailureMechanismSectionResult.cs) (revision 673e35de0df920529e5dda63ea8b4dfb08ed65a8) +++ Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Data/WaveImpactAsphaltCoverFailureMechanismSectionResult.cs (.../WaveImpactAsphaltCoverFailureMechanismSectionResult.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -39,7 +39,7 @@ /// Thrown when is null. public WaveImpactAsphaltCoverFailureMechanismSectionResult(FailureMechanismSection section) : base(section) { - AssessmentLayerTwoA = (RoundedDouble) double.NaN; + AssessmentLayerTwoA = RoundedDouble.NaN; } /// Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Service.Test/WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs =================================================================== diff -u -r87b3dec8abf9077375a10deb16d508d9cc2711e4 -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Service.Test/WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs) (revision 87b3dec8abf9077375a10deb16d508d9cc2711e4) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Service.Test/WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) @@ -152,7 +152,7 @@ { // Setup WaveImpactAsphaltCoverWaveConditionsCalculation calculation = GetDefaultCalculation(); - calculation.InputParameters.HydraulicBoundaryLocation.DesignWaterLevel = (RoundedDouble) double.NaN; + calculation.InputParameters.HydraulicBoundaryLocation.DesignWaterLevel = RoundedDouble.NaN; var isValid = true;