Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs =================================================================== diff -u -rce31448a066c084f755439f3e7d453bfb042b291 -r0cdb24eee9b746ab5d21381ca51c6836dd460292 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs (.../DerivedPipingInputTest.cs) (revision ce31448a066c084f755439f3e7d453bfb042b291) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs (.../DerivedPipingInputTest.cs) (revision 0cdb24eee9b746ab5d21381ca51c6836dd460292) @@ -713,7 +713,7 @@ } [Test] - public void SaturatedVolumicWeightOfCoverageLayer_MultipleLayersEqualShiftAndStandardDeviation_ReturnsWithWeightedMean() + public void SaturatedVolumicWeightOfCoverageLayer_MultipleLayersEqualStandardDeviationAndShift_ReturnsWithWeightedMean() { // Setup var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); @@ -753,6 +753,54 @@ } [Test] + [TestCase(0.01, 0)] + [TestCase(0, 0.01)] + [TestCase(2, 1)] + [TestCase(3, -1)] + [TestCase(-0.01, 0)] + [TestCase(0, -0.01)] + [TestCase(-2, 1)] + [TestCase(-3, -1)] + public void SaturatedVolumicWeightOfCoverageLayer_MultipleLayersInequalStandardDeviationOrShift_ReturnsNaNValues(double deviationDelta, double shiftDelta) + { + // Setup + var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var derivedInput = new DerivedPipingInput(input); + var random = new Random(21); + var belowPhreaticLevelMeanA = random.NextDouble(); + var belowPhreaticLevelMeanB = random.NextDouble(); + double deviation = random.NextDouble(); + double shift = random.NextDouble(); + input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] + { + new PipingSoilLayer(2.5) + { + BelowPhreaticLevelDeviation = deviation, + BelowPhreaticLevelShift = shift, + BelowPhreaticLevelMean = belowPhreaticLevelMeanA + }, + new PipingSoilLayer(-0.5) + { + BelowPhreaticLevelDeviation = deviation + deviationDelta, + BelowPhreaticLevelShift = shift + shiftDelta, + BelowPhreaticLevelMean = belowPhreaticLevelMeanB + }, + new PipingSoilLayer(-1.5) + { + IsAquifer = true + }, + }, SoilProfileType.SoilProfile1D, 0); + + // Call + var result = derivedInput.SaturatedVolumicWeightOfCoverageLayer; + + // Assert + Assert.IsNaN(result.Mean); + Assert.IsNaN(result.Shift); + Assert.IsNaN(result.StandardDeviation); + } + + [Test] public void DarcyPermeability_NoSoilProfile_ReturnsNaNForParameters() { // Setup