Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs =================================================================== diff -u -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 -rcce96a7520196dcc65d1c40d03fbbf473340088d --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs (.../DerivedPipingInputTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/DerivedPipingInputTest.cs (.../DerivedPipingInputTest.cs) (revision cce96a7520196dcc65d1c40d03fbbf473340088d) @@ -51,7 +51,7 @@ public void Constructor_WithPipingInput_DoesNotThrow() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(1.0, 1.1); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(1.0, 1.1); // Call TestDelegate call = () => new DerivedPipingInput(input); @@ -144,7 +144,7 @@ public void PiezometricHeadExit_InputWithAssessmentLevelMissing_PiezometricHeadSetToNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(1.0, 1.0); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(1.0, 1.0); var derivedInput = new DerivedPipingInput(input); // Call @@ -158,7 +158,7 @@ public void ThicknessAquiferLayer_SoilProfileSingleAquiferAndCoverageUnderSurfaceLine_ReturnsMeanExpectedThicknessAquiferLayer() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); // Call @@ -172,7 +172,7 @@ public void ThicknessCoverageLayer_SoilProfileSingleAquiferAndCoverageUnderSurfaceLine_ReturnsThicknessCoverageLayer() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); // Call @@ -186,7 +186,7 @@ public void ThicknessAquiferLayer_InputWithoutSoilProfile_ReturnMeanNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = null; var derivedInput = new DerivedPipingInput(input); @@ -201,7 +201,7 @@ public void ThicknessCoverageLayer_InputWithoutSoilProfile_MeansSetToNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = null; var derivedInput = new DerivedPipingInput(input); @@ -216,7 +216,7 @@ public void ThicknessAquiferLayer_InputWithoutSurfaceLine_ReturnMeanNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.SurfaceLine = null; var derivedInput = new DerivedPipingInput(input); @@ -233,7 +233,7 @@ public void ThicknessCoverageLayer_InputWithoutSurfaceLine_MeansSetToNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.SurfaceLine = null; var derivedInput = new DerivedPipingInput(input); @@ -252,7 +252,7 @@ public void ThicknessCoverageLayer_SoilProfileSingleAquiferAboveSurfaceLine_ThicknessCoverageLayerNaN(double deltaAboveSurfaceLine) { // Setup - var input = PipingCalculationFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); + var input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); var derivedInput = new DerivedPipingInput(input); // Call @@ -268,7 +268,7 @@ public void ThicknessAquiferLayer_SoilProfileSingleAquiferAboveSurfaceLine_ReturnMeanNaN(double deltaAboveSurfaceLine) { // Setup - var input = PipingCalculationFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); + var input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); var derivedInput = new DerivedPipingInput(input); // Call @@ -283,7 +283,7 @@ { // Setup double expectedThickness; - var input = PipingCalculationFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedThickness); + var input = PipingInputFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedThickness); var derivedInput = new DerivedPipingInput(input); // Call @@ -297,7 +297,7 @@ public void ThicknessAquiferLayer_MeanSetExitPointSetToNaN_ReturnMeanNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ExitPointL = RoundedDouble.NaN; var derivedInput = new DerivedPipingInput(input); @@ -314,7 +314,7 @@ public void ThicknessCoverageLayer_MeanSetSoilProfileSetToNull_ThicknessCoverageLayerNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ThicknessCoverageLayer.Mean = new RoundedDouble(2, new Random(21).NextDouble() + 1); var derivedInput = new DerivedPipingInput(input); @@ -333,7 +333,7 @@ public void ThicknessCoverageLayer_ProfileWithoutAquiferLayer_ThicknessCoverageLayerNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -357,7 +357,7 @@ public void ThicknessAquiferLayer_ProfileWithoutAquiferLayer_ReturnMeanNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -381,7 +381,7 @@ public void ThicknessAquiferLayer_SoilProfileSingleAquiferUnderSurfaceLine_ReturnMeanExpectedThicknessAquiferLayer() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); // Call @@ -395,7 +395,7 @@ public void ThicknessAquiferLayer_MeanSetSoilProfileSetToNull_ReturnMeanNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = null; @@ -411,7 +411,7 @@ public void ThicknessAquiferLayer_InputResultsInZeroAquiferThickness_ReturnMeanNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -439,7 +439,7 @@ public void ThicknessCoverageLayer_InputResultsInZeroCoverageThickness_ThicknessCoverageLayerNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -467,7 +467,7 @@ public void ThicknessAquiferLayer_SurfaceLineHalfWayProfileLayer_ConsecutiveThicknessSetToLayerHeightUnderSurfaceLine() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -495,7 +495,7 @@ public void SeepageLength_ValidData_ReturnsSeepageLength() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); // Call @@ -510,7 +510,7 @@ public void SeepageLength_EntryPointNaN_SeepageLengthNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.EntryPointL = RoundedDouble.NaN; var derivedInput = new DerivedPipingInput(input); @@ -526,7 +526,7 @@ public void SeepageLength_ExitPointNaN_SeepageLengthNaN() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ExitPointL = RoundedDouble.NaN; var derivedInput = new DerivedPipingInput(input); @@ -542,7 +542,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoSoilProfile_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = null; @@ -559,7 +559,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoStochasticSoilProfile_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = null; @@ -576,7 +576,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoSurfaceLine_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.SurfaceLine = null; @@ -593,7 +593,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoExitPointL_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.ExitPointL = RoundedDouble.NaN; @@ -610,7 +610,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoAquitardLayers_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -633,7 +633,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoAquiferLayers_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -656,7 +656,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoCoverageLayersAboveTopAquiferLayer_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -683,7 +683,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_SingleLayer_ReturnsWithParametersFromLayer() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); double belowPhreaticLevelMean = random.NextDouble(); @@ -716,7 +716,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_MultipleLayersEqualStandardDeviationAndShift_ReturnsWithWeightedMean() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); var belowPhreaticLevelMeanA = random.NextDouble(); @@ -764,7 +764,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_MultipleLayersInequalStandardDeviationOrShift_ReturnsNaNValues(double deviationDelta, double shiftDelta) { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); var belowPhreaticLevelMeanA = random.NextDouble(); @@ -804,7 +804,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_MultipleLayersInequalStandardDeviationOrShiftButEqualWhenRounded_ReturnsWithWeightedMean() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var belowPhreaticLevelMeanA = 2.5; var belowPhreaticLevelMeanB = 3.4; @@ -841,7 +841,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_OneLayerWithIncorrectShiftMeanCombination_ReturnsNaNValues() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -870,7 +870,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_MultipleLayersOneLayerWithIncorrectShiftMeanCombination_ReturnsNaNValues() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -905,7 +905,7 @@ public void DarcyPermeability_NoSoilProfile_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = null; @@ -921,7 +921,7 @@ public void DarcyPermeability_NoStochasticSoilProfile_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = null; @@ -937,7 +937,7 @@ public void DarcyPermeability_NoSurfaceLine_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.SurfaceLine = null; @@ -953,7 +953,7 @@ public void DarcyPermeability_NoExitPointL_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.ExitPointL = RoundedDouble.NaN; @@ -969,7 +969,7 @@ public void DarcyPermeability_NoAquiferLayers_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -988,7 +988,7 @@ public void DarcyPermeability_SingleAquiferLayers_ReturnsWithParametersFromLayer() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); var permeabilityMean = random.NextDouble(); @@ -1015,7 +1015,7 @@ public void DarcyPermeability_MultipleAquiferLayers_ReturnsWithParametersFromTopmostLayer() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var permeabilityMean = 0.5; var permeabilityDeviation = 0.2; @@ -1047,7 +1047,7 @@ public void DiameterD70_NoSoilProfile_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = null; @@ -1063,7 +1063,7 @@ public void DiameterD70_NoStochasticSoilProfile_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = null; @@ -1079,7 +1079,7 @@ public void DiameterD70_NoSurfaceLine_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.SurfaceLine = null; @@ -1095,7 +1095,7 @@ public void DiameterD70_NoExitPointL_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.ExitPointL = RoundedDouble.NaN; @@ -1111,7 +1111,7 @@ public void DiameterD70_NoAquiferLayers_ReturnsNaNForParameters() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -1130,7 +1130,7 @@ public void DiameterD70_SingleAquiferLayers_ReturnsWithParametersFromLayer() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); var diameterD70Mean = random.NextDouble(); @@ -1157,7 +1157,7 @@ public void DiameterD70_MultipleAquiferLayers_ReturnsWithParametersFromTopmostLayer() { // Setup - var input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + var input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var diameterD70Mean = 0.5; var diameterD70Deviation = 0.2; Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs =================================================================== diff -u -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 -rcce96a7520196dcc65d1c40d03fbbf473340088d --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision cce96a7520196dcc65d1c40d03fbbf473340088d) @@ -197,7 +197,7 @@ public void ExitPointL_ExitPointNotOnSurfaceLine_ThrowsArgumentOutOfRangeException(double value) { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.EntryPointL = RoundedDouble.NaN; // Call @@ -216,7 +216,7 @@ public void ExitPointL_SetToNew_ValueIsRounded(double exitPointValue) { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.EntryPointL = RoundedDouble.NaN; int originalNumberOfDecimalPlaces = input.ExitPointL.NumberOfDecimalPlaces; @@ -256,7 +256,7 @@ public void EntryPointL_EntryPointNotOnSurfaceLine_ThrowsArgumentOutOfRangeException(double value) { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ExitPointL = RoundedDouble.NaN; // Call TestDelegate call = () => input.EntryPointL = (RoundedDouble) value; @@ -275,7 +275,7 @@ public void EntryPointL_SetToNew_ValueIsRounded(double entryPointValue) { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ExitPointL = RoundedDouble.NaN; int originalNumberOfDecimalPlaces = input.EntryPointL.NumberOfDecimalPlaces; @@ -428,7 +428,7 @@ public void PiezometricHeadExit_InputWithAssessmentLevelMissing_PiezometricHeadSetToNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(1.0, 1.0); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(1.0, 1.0); // Call RoundedDouble piezometricHead = input.PiezometricHeadExit; @@ -441,7 +441,7 @@ public void ThicknessAquiferLayer_SoilProfileSingleAquiferAndCoverageUnderSurfaceLine_ReturnsThicknessAquiferLayer() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); // Call LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; @@ -454,7 +454,7 @@ public void ThicknessAquiferLayer_InputWithoutSoilProfile_MeansSetToNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = null; // Call @@ -468,7 +468,7 @@ public void ThicknessCoverageLayer_InputWithoutSoilProfile_MeansSetToNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = null; // Call @@ -482,7 +482,7 @@ public void ThicknessAquiferLayer_InputWithoutSurfaceLine_MeansSetToNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.SurfaceLine = null; // Call @@ -496,7 +496,7 @@ public void ThicknessCoverageLayer_InputWithoutSurfaceLine_MeansSetToNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.SurfaceLine = null; // Call @@ -512,7 +512,7 @@ public void ThicknessCoverageLayer_SoilProfileSingleAquiferAboveSurfaceLine_ThicknessCoverageLayerNaN(double deltaAboveSurfaceLine) { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); + PipingInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); // Call LogNormalDistribution thicknessCoverageLayer = input.ThicknessCoverageLayer; @@ -527,7 +527,7 @@ public void ThicknessAquiferLayer_SoilProfileSingleAquiferAboveSurfaceLine_ThicknessCoverageLayerNaN(double deltaAboveSurfaceLine) { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); + PipingInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); // Call LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; @@ -541,7 +541,7 @@ { // Setup double expectedThickness; - PipingInput input = PipingCalculationFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedThickness); + PipingInput input = PipingInputFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedThickness); // Call LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; @@ -554,7 +554,7 @@ public void ThicknessAquiferLayer_MeanSetExitPointSetToNaN_ThicknessAquiferLayerNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ExitPointL = RoundedDouble.NaN; // Call @@ -568,7 +568,7 @@ public void ThicknessCoverageLayer_MeanSetSoilProfileSetToNull_ThicknessCoverageLayerNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ThicknessCoverageLayer.Mean = new RoundedDouble(2, new Random(21).NextDouble() + 1); input.StochasticSoilProfile = null; @@ -584,7 +584,7 @@ public void ThicknessCoverageLayer_ProfileWithoutAquiferLayer_ThicknessCoverageLayerNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] @@ -607,7 +607,7 @@ public void ThicknessAquiferLayer_ProfileWithoutAquiferLayer_ThicknessAquiferLayerNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] @@ -630,7 +630,7 @@ public void ThicknessAquiferLayer_SoilProfileSingleAquiferUnderSurfaceLine_ThicknessAquiferLayerMeanSet() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); // Call LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; @@ -644,7 +644,7 @@ { // Setup double expectedThickness; - PipingInput input = PipingCalculationFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedThickness); + PipingInput input = PipingInputFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedThickness); // Call LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; @@ -657,7 +657,7 @@ public void ThicknessAquiferLayer_MeanSetSoilProfileSetToNull_ThicknessAquiferLayerNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = null; @@ -672,7 +672,7 @@ public void ThicknessAquiferLayer_InputResultsInZeroAquiferThickness_ThicknessAquiferLayerNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] @@ -699,7 +699,7 @@ public void ThicknessCoverageLayer_InputResultsInZeroCoverageThickness_ThicknessCoverageLayerNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] @@ -726,7 +726,7 @@ public void ThicknessAquiferLayer_SurfaceLineHalfWayProfileLayer_ThicknessSetToLayerHeightUnderSurfaceLine() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] @@ -753,7 +753,7 @@ public void SeepageLength_ValidData_ReturnsSeepageLength() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); // Call LogNormalDistribution seepageLength = input.SeepageLength; @@ -767,7 +767,7 @@ public void SeepageLength_EntryPointNaN_SeepageLengthNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.EntryPointL = RoundedDouble.NaN; // Call @@ -782,7 +782,7 @@ public void SeepageLength_ExitPointNaN_SeepageLengthNaN() { // Setup - PipingInput input = PipingCalculationFactory.CreateInputWithAquiferAndCoverageLayer(); + PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ExitPointL = RoundedDouble.NaN; // Call Fisheye: Tag cce96a7520196dcc65d1c40d03fbbf473340088d refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingCalculationFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingInputFactory.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingInputFactory.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingInputFactory.cs (revision cce96a7520196dcc65d1c40d03fbbf473340088d) @@ -0,0 +1,153 @@ +// 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 Core.Common.Base.Data; +using Core.Common.Base.Geometry; +using Ringtoets.Piping.Primitives; + +namespace Ringtoets.Piping.Data.TestUtil +{ + /// + /// Helper class for creating different instances of + /// for easier testing. + /// + public static class PipingInputFactory + { + /// + /// Creates piping input with an aquifer layer and coverage layer. + /// + /// The thickness of the aquifer layer. + /// The thickness of the coverage layer. + /// A new . + public static PipingInput CreateInputWithAquiferAndCoverageLayer(double thicknessAquiferLayer = 1.0, double thicknessCoverageLayer = 2.0) + { + var surfaceLine = new RingtoetsPipingSurfaceLine(); + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, thicknessCoverageLayer), + new Point3D(1.0, 0, thicknessCoverageLayer) + }); + var stochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) + { + SoilProfile = new PipingSoilProfile(string.Empty, -thicknessAquiferLayer, new[] + { + new PipingSoilLayer(thicknessCoverageLayer) + { + IsAquifer = false + }, + new PipingSoilLayer(0.0) + { + IsAquifer = true + } + }, SoilProfileType.SoilProfile1D, 0) + }; + + return new PipingInput(new GeneralPipingInput()) + { + SurfaceLine = surfaceLine, + StochasticSoilProfile = stochasticSoilProfile, + ExitPointL = (RoundedDouble) 0.5 + }; + } + + /// + /// Creates piping input with a single aquifer layer above the surface line. + /// + /// The distance between the aquifer layer and the surface line. + /// A new . + public static PipingInput CreateInputWithSingleAquiferLayerAboveSurfaceLine(double deltaAboveSurfaceLine) + { + var surfaceLine = new RingtoetsPipingSurfaceLine(); + var surfaceLineTopLevel = 2.0; + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, surfaceLineTopLevel), + new Point3D(1.0, 0, surfaceLineTopLevel) + }); + var stochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) + { + SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] + { + new PipingSoilLayer(surfaceLineTopLevel + deltaAboveSurfaceLine + 2) + { + IsAquifer = false + }, + new PipingSoilLayer(surfaceLineTopLevel + deltaAboveSurfaceLine + 1) + { + IsAquifer = true + }, + new PipingSoilLayer(surfaceLineTopLevel + deltaAboveSurfaceLine) + { + IsAquifer = false + } + }, SoilProfileType.SoilProfile1D, 0) + }; + var input = new PipingInput(new GeneralPipingInput()) + { + SurfaceLine = surfaceLine, + StochasticSoilProfile = stochasticSoilProfile, + ExitPointL = (RoundedDouble) 0.5 + }; + return input; + } + + /// + /// Creates piping input with multiple aquifer layers under the surface line. + /// + /// The expected thickness of the aquifer. + /// A new . + public static PipingInput CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out double expectedThickness) + { + var surfaceLine = new RingtoetsPipingSurfaceLine(); + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, 3.3), + new Point3D(1.0, 0, 3.3) + }); + var stochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) + { + SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] + { + new PipingSoilLayer(4.3) + { + IsAquifer = false + }, + new PipingSoilLayer(3.3) + { + IsAquifer = true + }, + new PipingSoilLayer(1.1) + { + IsAquifer = true + } + }, SoilProfileType.SoilProfile1D, 0) + }; + var input = new PipingInput(new GeneralPipingInput()) + { + SurfaceLine = surfaceLine, + StochasticSoilProfile = stochasticSoilProfile, + ExitPointL = (RoundedDouble) 0.5 + }; + expectedThickness = 3.3; + return input; + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/Ringtoets.Piping.Data.TestUtil.csproj =================================================================== diff -u -rb39d085012e7d50a761a38b485bf7c0e948ad7f4 -rcce96a7520196dcc65d1c40d03fbbf473340088d --- Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/Ringtoets.Piping.Data.TestUtil.csproj (.../Ringtoets.Piping.Data.TestUtil.csproj) (revision b39d085012e7d50a761a38b485bf7c0e948ad7f4) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/Ringtoets.Piping.Data.TestUtil.csproj (.../Ringtoets.Piping.Data.TestUtil.csproj) (revision cce96a7520196dcc65d1c40d03fbbf473340088d) @@ -46,7 +46,7 @@ Properties\GlobalAssembly.cs - +