Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs =================================================================== diff -u -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 -rebdbf01f6ab35a28b3a306145796ce532920af62 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision df9261fbb60c129167c1d6a2ca9aed6dc0885f07) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision ebdbf01f6ab35a28b3a306145796ce532920af62) @@ -231,7 +231,7 @@ } [Test] - [TestCaseSource("NormalDistributionsWithInvalidMean")] + [TestCaseSource(nameof(NormalDistributionsWithInvalidMean))] public void Validate_NormalDistributionMeanInvalid_LogsErrorAndReturnsFalse(double meanOne, double meanTwo, double meanThree, string parameterName) { // Setup @@ -277,7 +277,7 @@ } [Test] - [TestCaseSource("LogNormalDistributionsWithInvalidMean")] + [TestCaseSource(nameof(LogNormalDistributionsWithInvalidMean))] public void Validate_LogNormalDistributionMeanInvalid_LogsErrorAndReturnsFalse(double meanOne, double meanTwo, double meanThree, double meanFour, double meanFive, string parameterName) { @@ -325,9 +325,10 @@ } [Test] - [TestCaseSource("DistributionsWithInvalidDeviation")] + [TestCaseSource(nameof(DistributionsWithInvalidDeviation))] public void Validate_DistributionStandardDeviationInvalid_LogsErrorAndReturnsFalse(double deviationOne, double deviationTwo, - double deviationThree, double deviationFour, string parameterName) + double deviationThree, double deviationFour, + double deviationFive, string parameterName) { // Setup var mockRepository = new MockRepository(); @@ -352,6 +353,7 @@ calculation.InputParameters.LevelCrestStructure.StandardDeviation = (RoundedDouble) deviationTwo; calculation.InputParameters.AllowedLevelIncreaseStorage.StandardDeviation = (RoundedDouble) deviationThree; calculation.InputParameters.FlowWidthAtBottomProtection.StandardDeviation = (RoundedDouble) deviationFour; + calculation.InputParameters.WidthFlowApertures.StandardDeviation = (RoundedDouble) deviationFive; // Call bool isValid = false; @@ -372,9 +374,9 @@ } [Test] - [TestCaseSource("DistributionsWithInvalidCoefficient")] + [TestCaseSource(nameof(DistributionsWithInvalidCoefficient))] public void Validate_DistributionVariationCoefficientInvalid_LogsErrorAndReturnsFalse( - double coefficientOne, double coefficientTwo, double coefficientThree, double coefficientFour, string parameterName) + double coefficientOne, double coefficientTwo, double coefficientThree, string parameterName) { // Setup var mockRepository = new MockRepository(); @@ -398,7 +400,6 @@ calculation.InputParameters.StormDuration.CoefficientOfVariation = (RoundedDouble) coefficientOne; calculation.InputParameters.StorageStructureArea.CoefficientOfVariation = (RoundedDouble) coefficientTwo; calculation.InputParameters.CriticalOvertoppingDischarge.CoefficientOfVariation = (RoundedDouble) coefficientThree; - calculation.InputParameters.WidthFlowApertures.CoefficientOfVariation = (RoundedDouble) coefficientFour; // Call bool isValid = false; @@ -680,7 +681,7 @@ input.FlowWidthAtBottomProtection.Mean, input.FlowWidthAtBottomProtection.StandardDeviation, input.CriticalOvertoppingDischarge.Mean, input.CriticalOvertoppingDischarge.CoefficientOfVariation, input.FailureProbabilityStructureWithErosion, - input.WidthFlowApertures.Mean, input.WidthFlowApertures.CoefficientOfVariation, + input.WidthFlowApertures.Mean, input.WidthFlowApertures.StandardDeviation, input.DeviationWaveDirection, input.StormDuration.Mean, input.StormDuration.CoefficientOfVariation); @@ -973,35 +974,35 @@ { get { - yield return new TestCaseData(double.NaN, 1, 2, 3, "modelfactor overloopdebiet volkomen overlaat"); - yield return new TestCaseData(double.PositiveInfinity, 1, 2, 3, "modelfactor overloopdebiet volkomen overlaat"); + yield return new TestCaseData(double.NaN, 1, 2, 3, 4, "modelfactor overloopdebiet volkomen overlaat"); + yield return new TestCaseData(double.PositiveInfinity, 1, 2, 3, 4, "modelfactor overloopdebiet volkomen overlaat"); - yield return new TestCaseData(1, double.NaN, 2, 3, "kerende hoogte"); - yield return new TestCaseData(1, double.PositiveInfinity, 2, 3, "kerende hoogte"); + yield return new TestCaseData(1, double.NaN, 2, 3, 4, "kerende hoogte"); + yield return new TestCaseData(1, double.PositiveInfinity, 2, 3, 4, "kerende hoogte"); - yield return new TestCaseData(1, 2, double.NaN, 3, "toegestane peilverhoging komberging"); - yield return new TestCaseData(1, 2, double.PositiveInfinity, 3, "toegestane peilverhoging komberging"); + yield return new TestCaseData(1, 2, double.NaN, 3, 4, "toegestane peilverhoging komberging"); + yield return new TestCaseData(1, 2, double.PositiveInfinity, 3, 4, "toegestane peilverhoging komberging"); - yield return new TestCaseData(1, 2, 3, double.NaN, "stroomvoerende breedte bodembescherming"); - yield return new TestCaseData(1, 2, 3, double.PositiveInfinity, "stroomvoerende breedte bodembescherming"); + yield return new TestCaseData(1, 2, 3, double.NaN, 4, "stroomvoerende breedte bodembescherming"); + yield return new TestCaseData(1, 2, 3, double.PositiveInfinity, 4, "stroomvoerende breedte bodembescherming"); + + yield return new TestCaseData(1, 2, 3, 4, double.NaN, "breedte van doorstroomopening"); + yield return new TestCaseData(1, 2, 3, 4, double.PositiveInfinity, "breedte van doorstroomopening"); } } private static IEnumerable DistributionsWithInvalidCoefficient { get { - yield return new TestCaseData(double.NaN, 1, 2, 3, "stormduur"); - yield return new TestCaseData(double.PositiveInfinity, 1, 2, 3, "stormduur"); + yield return new TestCaseData(double.NaN, 1, 2, "stormduur"); + yield return new TestCaseData(double.PositiveInfinity, 1, 2, "stormduur"); yield return new TestCaseData(1, double.NaN, 2, 3, "kombergend oppervlak"); - yield return new TestCaseData(1, double.PositiveInfinity, 2, 3, "kombergend oppervlak"); + yield return new TestCaseData(1, double.PositiveInfinity, 2, "kombergend oppervlak"); yield return new TestCaseData(1, 2, double.NaN, 3, "kritiek instromend debiet"); - yield return new TestCaseData(1, 2, double.PositiveInfinity, 3, "kritiek instromend debiet"); - - yield return new TestCaseData(1, 2, 3, double.NaN, "breedte van doorstroomopening"); - yield return new TestCaseData(1, 2, 3, double.PositiveInfinity, "breedte van doorstroomopening"); + yield return new TestCaseData(1, 2, double.PositiveInfinity, "kritiek instromend debiet"); } }