Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -r6ed9c7e3fd4c8b5bd967b2a39b97b04741cff8dc -rec3096516cbba4c5b7b45bf4d35ad5b1230b1c55 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 6ed9c7e3fd4c8b5bd967b2a39b97b04741cff8dc) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision ec3096516cbba4c5b7b45bf4d35ad5b1230b1c55) @@ -346,16 +346,18 @@ IAssessmentSection assessmentSection) { failureMechanism.GeneralInput.N = 8; + + StabilityPointStructure stabilityPointStructure = new TestStabilityPointStructure(); + failureMechanism.StabilityPointStructures.Add(stabilityPointStructure); failureMechanism.StabilityPointStructures.Add(new TestStabilityPointStructure()); - failureMechanism.StabilityPointStructures.Add(new TestStabilityPointStructure()); var random = new Random(56); ForeshoreProfile foreshoreProfile = failureMechanism.ForeshoreProfiles[0]; HydraulicBoundaryLocation hydroLocation = assessmentSection.HydraulicBoundaryDatabase.Locations[0]; failureMechanism.CalculationsGroup.Children.Add(new CalculationGroup { - Name = "StabilityPoint Structure A", + Name = "StabilityPoint structures A", Children = { new StructuresCalculation @@ -364,141 +366,40 @@ Comments = "Fully configured for greatness!", InputParameters = { - StormDuration = - { - Mean = (RoundedDouble) random.NextDouble(), - }, - StructureNormalOrientation = (RoundedDouble) random.NextDouble(), - FailureProbabilityStructureWithErosion = random.NextDouble(), - UseForeshore = random.NextBoolean(), - UseBreakWater = random.NextBoolean(), BreakWater = { Type = BreakWaterType.Dam, Height = (RoundedDouble) random.NextDouble() }, - AllowedLevelIncreaseStorage = + DrainCoefficient = { - Mean = (RoundedDouble) random.NextDouble(), - StandardDeviation = (RoundedDouble) random.NextDouble() + Mean = (RoundedDouble) random.NextDouble() }, - StorageStructureArea = - { - Mean = (RoundedDouble) random.NextDouble(), - CoefficientOfVariation = (RoundedDouble) random.NextDouble() - }, - FlowWidthAtBottomProtection = - { - Mean = (RoundedDouble) random.NextDouble(), - StandardDeviation = (RoundedDouble) random.NextDouble() - }, - CriticalOvertoppingDischarge = - { - Mean = (RoundedDouble) random.NextDouble(), - CoefficientOfVariation = (RoundedDouble) random.NextDouble() - }, + FactorStormDurationOpenStructure = (RoundedDouble) random.NextDouble(), + FailureProbabilityStructureWithErosion = random.NextDouble(), + ForeshoreProfile = foreshoreProfile, + HydraulicBoundaryLocation = hydroLocation, + LoadSchematizationType = LoadSchematizationType.Quadratic, ModelFactorSuperCriticalFlow = { Mean = (RoundedDouble) random.NextDouble() }, - WidthFlowApertures = - { - Mean = (RoundedDouble) random.NextDouble(), - CoefficientOfVariation = (RoundedDouble) random.NextDouble() - }, - InsideWaterLevel = - { - Mean = (RoundedDouble) random.NextDouble(), - StandardDeviation = (RoundedDouble) random.NextDouble() - }, - ThresholdHeightOpenWeir = - { - Mean = (RoundedDouble) random.NextDouble(), - StandardDeviation = (RoundedDouble) random.NextDouble() - }, - ConstructiveStrengthLinearLoadModel = - { - Mean = (RoundedDouble) random.NextDouble(), - CoefficientOfVariation = (RoundedDouble) random.NextDouble() - }, - ConstructiveStrengthQuadraticLoadModel = - { - Mean = (RoundedDouble) random.NextDouble(), - CoefficientOfVariation = (RoundedDouble) random.NextDouble() - }, - BankWidth = - { - Mean = (RoundedDouble) random.NextDouble(), - StandardDeviation = (RoundedDouble) random.NextDouble() - }, - InsideWaterLevelFailureConstruction = - { - Mean = (RoundedDouble) random.NextDouble(), - StandardDeviation = (RoundedDouble) random.NextDouble() - }, - EvaluationLevel = (RoundedDouble) random.NextDouble(), - LevelCrestStructure = - { - Mean = (RoundedDouble) random.NextDouble(), - StandardDeviation = (RoundedDouble) random.NextDouble() - }, - VerticalDistance = (RoundedDouble) random.NextDouble(), - FailureProbabilityRepairClosure = random.NextDouble(), - FailureCollisionEnergy = - { - Mean = (RoundedDouble) random.NextDouble(), - CoefficientOfVariation = (RoundedDouble) random.NextDouble() - }, - ShipMass = - { - Mean = (RoundedDouble) random.NextDouble(), - CoefficientOfVariation = (RoundedDouble) random.NextDouble() - }, - ShipVelocity = - { - Mean = (RoundedDouble) random.NextDouble(), - CoefficientOfVariation = (RoundedDouble) random.NextDouble() - }, - LevellingCount = random.Next(), - ProbabilityCollisionSecondaryStructure = random.NextDouble(), - FlowVelocityStructureClosable = - { - Mean = (RoundedDouble) random.NextDouble(), - StandardDeviation = (RoundedDouble) random.NextDouble() - }, - StabilityLinearLoadModel = - { - Mean = (RoundedDouble) random.NextDouble(), - CoefficientOfVariation = (RoundedDouble) random.NextDouble() - }, - StabilityQuadraticLoadModel = - { - Mean = (RoundedDouble) random.NextDouble(), - CoefficientOfVariation = (RoundedDouble) random.NextDouble() - }, - AreaFlowApertures = - { - Mean = (RoundedDouble) random.NextDouble(), - StandardDeviation = (RoundedDouble) random.NextDouble() - }, - InflowModelType = StabilityPointStructureInflowModelType.LowSill, - LoadSchematizationType = LoadSchematizationType.Quadratic, VolumicWeightWater = (RoundedDouble) random.NextDouble(), - FactorStormDurationOpenStructure = (RoundedDouble) random.NextDouble(), - DrainCoefficient = + UseForeshore = random.NextBoolean(), + UseBreakWater = random.NextBoolean(), + StormDuration = { Mean = (RoundedDouble) random.NextDouble() }, - ForeshoreProfile = foreshoreProfile, - HydraulicBoundaryLocation = hydroLocation + Structure = stabilityPointStructure }, Output = new ProbabilityAssessmentOutput(0.7, 0.85, 0.9, 0.10, 0.11) } } }); failureMechanism.CalculationsGroup.Children.Add(new CalculationGroup { - Name = "StabilityPoint Structure B" + Name = "StabilityPoint structures B" }); failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); } @@ -528,103 +429,55 @@ IAssessmentSection assessmentSection) { failureMechanism.GeneralInput.N2A = 6; + + ClosingStructure closingStructure = new TestClosingStructure(); + failureMechanism.ClosingStructures.Add(closingStructure); failureMechanism.ClosingStructures.Add(new TestClosingStructure()); - failureMechanism.ClosingStructures.Add(new TestClosingStructure()); ForeshoreProfile foreshoreProfile = failureMechanism.ForeshoreProfiles[0]; HydraulicBoundaryLocation hydroLocation = assessmentSection.HydraulicBoundaryDatabase.Locations[0]; failureMechanism.CalculationsGroup.Children.Add(new CalculationGroup { - Name = "Closing Structure A", + Name = "Closing structures A", Children = { new StructuresCalculation { InputParameters = { - StormDuration = - { - Mean = (RoundedDouble) 1.1 - }, - StructureNormalOrientation = (RoundedDouble) 2.2, - FailureProbabilityStructureWithErosion = (RoundedDouble) 0.34, - UseForeshore = true, - UseBreakWater = true, BreakWater = { Type = BreakWaterType.Dam, Height = (RoundedDouble) 4.4 }, - AllowedLevelIncreaseStorage = - { - Mean = (RoundedDouble) 5.5, - StandardDeviation = (RoundedDouble) 6.6 - }, - StorageStructureArea = - { - Mean = (RoundedDouble) 7.7, - CoefficientOfVariation = (RoundedDouble) 8.8 - }, - FlowWidthAtBottomProtection = - { - Mean = (RoundedDouble) 9.9, - StandardDeviation = (RoundedDouble) 10.10 - }, - CriticalOvertoppingDischarge = - { - Mean = (RoundedDouble) 11.11, - CoefficientOfVariation = (RoundedDouble) 12.12 - }, - ModelFactorSuperCriticalFlow = - { - Mean = (RoundedDouble) 13.13 - }, - WidthFlowApertures = - { - Mean = (RoundedDouble) 14.14, - CoefficientOfVariation = (RoundedDouble) 15.15 - }, - InflowModelType = ClosingStructureInflowModelType.VerticalWall, - InsideWaterLevel = - { - Mean = (RoundedDouble) 16.16, - StandardDeviation = (RoundedDouble) 17.17 - }, + FactorStormDurationOpenStructure = (RoundedDouble) 0.56, + FailureProbabilityStructureWithErosion = (RoundedDouble) 0.34, + ForeshoreProfile = foreshoreProfile, DeviationWaveDirection = (RoundedDouble) 18.18, DrainCoefficient = { Mean = (RoundedDouble) 19.19 }, - FactorStormDurationOpenStructure = (RoundedDouble) 0.56, - ThresholdHeightOpenWeir = + HydraulicBoundaryLocation = hydroLocation, + ModelFactorSuperCriticalFlow = { - Mean = (RoundedDouble) 21.21, - StandardDeviation = (RoundedDouble) 22.22 + Mean = (RoundedDouble) 13.13 }, - AreaFlowApertures = + StormDuration = { - Mean = (RoundedDouble) 23.23, - StandardDeviation = (RoundedDouble) 24.24 + Mean = (RoundedDouble) 1.1 }, - FailureProbabilityOpenStructure = (RoundedDouble) 0.25, - FailureProbabilityReparation = (RoundedDouble) 0.46, - IdenticalApertures = 28, - LevelCrestStructureNotClosing = - { - Mean = (RoundedDouble) 29.29, - StandardDeviation = (RoundedDouble) 30.30 - }, - ProbabilityOpenStructureBeforeFlooding = (RoundedDouble) 0.98, - ForeshoreProfile = foreshoreProfile, - HydraulicBoundaryLocation = hydroLocation + Structure = closingStructure, + UseBreakWater = true, + UseForeshore = true }, Output = new ProbabilityAssessmentOutput(0.8, 0.95, 0.10, 0.11, 0.12) } } }); failureMechanism.CalculationsGroup.Children.Add(new CalculationGroup { - Name = "Closing Structure B" + Name = "Closing structures B" }); failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); } @@ -656,64 +509,40 @@ failureMechanism.GeneralInput.N = 5; var hydraulicBoundaryLocations = assessmentSection.HydraulicBoundaryDatabase.Locations; + + var heightStructure = new TestHeightStructure(); + failureMechanism.HeightStructures.Add(heightStructure); failureMechanism.HeightStructures.Add(new TestHeightStructure()); - failureMechanism.HeightStructures.Add(new TestHeightStructure()); ForeshoreProfile foreshoreProfile = failureMechanism.ForeshoreProfiles[0]; failureMechanism.CalculationsGroup.Children.Add(new CalculationGroup { - Name = "HS A", + Name = "Height structures A", Children = { new StructuresCalculation { InputParameters = { - StructureNormalOrientation = (RoundedDouble) 1.0, + ForeshoreProfile = foreshoreProfile, + HydraulicBoundaryLocation = hydraulicBoundaryLocations[0], ModelFactorSuperCriticalFlow = { Mean = (RoundedDouble) 1.1 }, - AllowedLevelIncreaseStorage = - { - Mean = (RoundedDouble) 1.2, - StandardDeviation = (RoundedDouble) 1.3 - }, - StorageStructureArea = - { - Mean = (RoundedDouble) 1.3, - CoefficientOfVariation = (RoundedDouble) 1.4 - }, - FlowWidthAtBottomProtection = - { - Mean = (RoundedDouble) 1.4, - StandardDeviation = (RoundedDouble) 1.5 - }, - CriticalOvertoppingDischarge = - { - Mean = (RoundedDouble) 1.5, - CoefficientOfVariation = (RoundedDouble) 1.6 - }, - FailureProbabilityStructureWithErosion = 0.05, - WidthFlowApertures = - { - Mean = (RoundedDouble) 1.6, - CoefficientOfVariation = (RoundedDouble) 1.7 - }, StormDuration = { Mean = (RoundedDouble) 1.7 }, - ForeshoreProfile = foreshoreProfile, - HydraulicBoundaryLocation = hydraulicBoundaryLocations[0] + Structure = heightStructure }, Output = new ProbabilityAssessmentOutput(0.8, 0.95, 0.10, 0.11, 0.12) } } }); failureMechanism.CalculationsGroup.Children.Add(new CalculationGroup { - Name = "HS B" + Name = "Height structures B" }); failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); } Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/MessageProviders/GrassCoverErosionOutwardsDesignWaterLevelCalculationMessageProviderTest.cs =================================================================== diff -u -rc7d39e2c22a5df98a9f398cab98040a51faba283 -rec3096516cbba4c5b7b45bf4d35ad5b1230b1c55 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/MessageProviders/GrassCoverErosionOutwardsDesignWaterLevelCalculationMessageProviderTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelCalculationMessageProviderTest.cs) (revision c7d39e2c22a5df98a9f398cab98040a51faba283) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/MessageProviders/GrassCoverErosionOutwardsDesignWaterLevelCalculationMessageProviderTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelCalculationMessageProviderTest.cs) (revision ec3096516cbba4c5b7b45bf4d35ad5b1230b1c55) @@ -39,9 +39,9 @@ } [Test] - [TestCase(null)] - [TestCase("")] - [TestCase("value")] + [TestCase(null, TestName = "GetCalculationName_ExpectedValue(null)")] + [TestCase("", TestName = "GetCalculationName_ExpectedValue(empty)")] + [TestCase("value", TestName = "GetCalculationName_ExpectedValue(value)")] public void GetCalculationName_ValidNames_ExpectedValue(string name) { // Setup @@ -109,9 +109,9 @@ } [Test] - [TestCase(null)] - [TestCase("")] - [TestCase("value")] + [TestCase(null, TestName = "GetCalculationFailedUnexplainedMessage_ExpectedValues(null)")] + [TestCase("", TestName = "GetCalculationFailedUnexplainedMessage_ExpectedValues(empty)")] + [TestCase("value", TestName = "GetCalculationFailedUnexplainedMessage_ExpectedValues(value)")] public void GetCalculationFailedUnexplainedMessage_ValidNames_ExpectedValues(string name) { // Setup Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs =================================================================== diff -u -rd7ddbdf7e550ba8a7c93fdbd740a84279598c68b -rec3096516cbba4c5b7b45bf4d35ad5b1230b1c55 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs (.../StabilityPointStructuresCalculationServiceTest.cs) (revision d7ddbdf7e550ba8a7c93fdbd740a84279598c68b) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs (.../StabilityPointStructuresCalculationServiceTest.cs) (revision ec3096516cbba4c5b7b45bf4d35ad5b1230b1c55) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Linq; @@ -157,7 +158,7 @@ } [Test] - public void Validate_CalculationWithoutStructuresValidHydraulicBoundaryDatabase_LogStartAndEndAndErrorMessage() + public void Validate_CalculationWithoutStructuresValidHydraulicBoundaryDatabase_LogStartEndAndErrorMessage() { // Setup var failureMechanism = new StabilityPointStructuresFailureMechanism(); @@ -206,7 +207,7 @@ [Test] [Combinatorial] - public void Validate_UseBreakWaterWithInvalidBreakWaterHeight_LogStartAndEndAndErrorMessageAndThrowsException( + public void Validate_UseBreakWaterWithInvalidBreakWaterHeight_LogStartEndError( [Values(StabilityPointStructureInflowModelType.FloodedCulvert, StabilityPointStructureInflowModelType.LowSill)] StabilityPointStructureInflowModelType inflowModelType, [Values(LoadSchematizationType.Quadratic, LoadSchematizationType.Linear)] LoadSchematizationType loadSchematizationType, [Values(double.NaN, double.PositiveInfinity, double.NegativeInfinity)] double breakWaterHeight)