Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructureTest.cs =================================================================== diff -u -re2197d5a4596fc769d89bd2f661d657490017d76 -rad75a347a7586757599297f2b2e776100d827264 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructureTest.cs (.../ClosingStructureTest.cs) (revision e2197d5a4596fc769d89bd2f661d657490017d76) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.Test/ClosingStructureTest.cs (.../ClosingStructureTest.cs) (revision ad75a347a7586757599297f2b2e776100d827264) @@ -19,9 +19,11 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Framework; using Ringtoets.Common.Data; +using Ringtoets.Common.Data.Probabilistics; namespace Ringtoets.ClosingStructures.Data.Test { @@ -35,14 +37,113 @@ var location = new Point2D(1.22, 2.333); // Call - var structure = new ClosingStructure("aName", "anId", location); + var structure = new ClosingStructure("aName", "anId", location, + 123.456, 0.123, + 234.567, 0.234, + 345.678, + 456.789, 0.456, + 567.890, 0.567, + 678.901, 0.678, + 789.012, 0.789, + 890.123, 0.890, + 901.234, 0.901, + 111.222, 0.111, + 321.987, + 654.321, + 42, + 987.654, + 1); // Assert Assert.IsInstanceOf(structure); Assert.AreEqual("aName", structure.Name); Assert.AreEqual("anId", structure.Id); + Assert.IsInstanceOf(structure.Location); Assert.AreEqual(location.X, structure.Location.X); Assert.AreEqual(location.Y, structure.Location.Y); + + var storageStructureArea = structure.StorageStructureArea; + Assert.IsInstanceOf(storageStructureArea); + Assert.AreEqual(2, storageStructureArea.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(123.46, storageStructureArea.Mean.Value); + Assert.AreEqual(2, storageStructureArea.StandardDeviation.NumberOfDecimalPlaces); + Assert.AreEqual(0.12, storageStructureArea.StandardDeviation.Value); + + var allowedLevelIncreaseStorage = structure.AllowedLevelIncreaseStorage; + Assert.IsInstanceOf(allowedLevelIncreaseStorage); + Assert.AreEqual(2, allowedLevelIncreaseStorage.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(234.57, allowedLevelIncreaseStorage.Mean.Value); + Assert.AreEqual(2, allowedLevelIncreaseStorage.StandardDeviation.NumberOfDecimalPlaces); + Assert.AreEqual(0.23, allowedLevelIncreaseStorage.StandardDeviation.Value); + + Assert.IsInstanceOf(structure.StructureNormalOrientation); + Assert.AreEqual(2, structure.StructureNormalOrientation.NumberOfDecimalPlaces); + Assert.AreEqual(345.68, structure.StructureNormalOrientation.Value); + + var widthFlowApertures = structure.WidthFlowApertures; + Assert.IsInstanceOf(widthFlowApertures); + Assert.AreEqual(2, widthFlowApertures.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(456.79, widthFlowApertures.Mean.Value); + Assert.AreEqual(2, widthFlowApertures.StandardDeviation.NumberOfDecimalPlaces); + Assert.AreEqual(0.46, widthFlowApertures.StandardDeviation.Value); + + var levelCrestStructureNotClosing = structure.LevelCrestStructureNotClosing; + Assert.IsInstanceOf(levelCrestStructureNotClosing); + Assert.AreEqual(2, levelCrestStructureNotClosing.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(567.89, levelCrestStructureNotClosing.Mean.Value); + Assert.AreEqual(2, levelCrestStructureNotClosing.StandardDeviation.NumberOfDecimalPlaces); + Assert.AreEqual(0.57, levelCrestStructureNotClosing.StandardDeviation.Value); + + var insideWaterLevel = structure.InsideWaterLevel; + Assert.IsInstanceOf(insideWaterLevel); + Assert.AreEqual(2, insideWaterLevel.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(678.90, insideWaterLevel.Mean.Value); + Assert.AreEqual(2, insideWaterLevel.StandardDeviation.NumberOfDecimalPlaces); + Assert.AreEqual(0.68, insideWaterLevel.StandardDeviation.Value); + + var thresholdHeightOpenWeir = structure.ThresholdHeightOpenWeir; + Assert.IsInstanceOf(thresholdHeightOpenWeir); + Assert.AreEqual(2, thresholdHeightOpenWeir.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(789.01, thresholdHeightOpenWeir.Mean.Value); + Assert.AreEqual(2, thresholdHeightOpenWeir.StandardDeviation.NumberOfDecimalPlaces); + Assert.AreEqual(0.79, thresholdHeightOpenWeir.StandardDeviation.Value); + + var areaFlowApertures = structure.AreaFlowApertures; + Assert.IsInstanceOf(areaFlowApertures); + Assert.AreEqual(2, areaFlowApertures.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(890.12, areaFlowApertures.Mean.Value); + Assert.AreEqual(2, areaFlowApertures.StandardDeviation.NumberOfDecimalPlaces); + Assert.AreEqual(0.89, areaFlowApertures.StandardDeviation.Value); + + var criticalOverToppingDischarge = structure.CriticalOverToppingDischarge; + Assert.IsInstanceOf(criticalOverToppingDischarge); + Assert.AreEqual(2, criticalOverToppingDischarge.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(901.23, criticalOverToppingDischarge.Mean.Value); + Assert.AreEqual(2, criticalOverToppingDischarge.StandardDeviation.NumberOfDecimalPlaces); + Assert.AreEqual(0.90, criticalOverToppingDischarge.StandardDeviation.Value); + + var flowWidthAtBottomProtection = structure.FlowWidthAtBottomProtection; + Assert.IsInstanceOf(flowWidthAtBottomProtection); + Assert.AreEqual(2, flowWidthAtBottomProtection.Mean.NumberOfDecimalPlaces); + Assert.AreEqual(111.22, flowWidthAtBottomProtection.Mean.Value); + Assert.AreEqual(2, flowWidthAtBottomProtection.StandardDeviation.NumberOfDecimalPlaces); + Assert.AreEqual(0.11, flowWidthAtBottomProtection.StandardDeviation.Value); + + Assert.IsInstanceOf(structure.ProbabilityOpenStructureBeforeFlooding); + Assert.AreEqual(2, structure.ProbabilityOpenStructureBeforeFlooding.NumberOfDecimalPlaces); + Assert.AreEqual(321.99, structure.ProbabilityOpenStructureBeforeFlooding.Value); + + Assert.IsInstanceOf(structure.FailureProbablityOpenStructure); + Assert.AreEqual(2, structure.FailureProbablityOpenStructure.NumberOfDecimalPlaces); + Assert.AreEqual(654.32, structure.FailureProbablityOpenStructure.Value); + + Assert.AreEqual(42, structure.NumberOfIdenticalApertures); + + Assert.IsInstanceOf(structure.FailureProbabilityReparation); + Assert.AreEqual(2, structure.FailureProbabilityReparation.NumberOfDecimalPlaces); + Assert.AreEqual(987.65, structure.FailureProbabilityReparation.Value); + + Assert.AreEqual(1, structure.InflowModel); } } -} +} \ No newline at end of file