Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/DerivedPipingInput.cs =================================================================== diff -u -r31bd06b3318091d003807e9604070cb628465701 -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/DerivedPipingInput.cs (.../DerivedPipingInput.cs) (revision 31bd06b3318091d003807e9604070cb628465701) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/DerivedPipingInput.cs (.../DerivedPipingInput.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -37,18 +37,18 @@ { private const double seepageLengthCoefficientOfVariation = 0.1; - private readonly PipingInput input; + private readonly MacroStabilityInwardsInput input; /// /// Creates a new instance of . /// /// The input to calculate the derived piping input. /// Thrown when is null. - public DerivedPipingInput(PipingInput input) + public DerivedPipingInput(MacroStabilityInwardsInput input) { if (input == null) { - throw new ArgumentNullException(nameof(input), @"Cannot create DerivedPipingInput without PipingInput."); + throw new ArgumentNullException(nameof(input), @"Cannot create DerivedPipingInput without MacroStabilityInwardsInput."); } this.input = input; } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsInput.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsInput.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsInput.cs (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -0,0 +1,603 @@ +// Copyright (C) Stichting Deltares 2017. 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 System; +using System.Globalization; +using System.Linq; +using Core.Common.Base; +using Core.Common.Base.Data; +using Core.Common.Base.Geometry; +using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.Probabilistics; +using Ringtoets.MacroStabilityInwards.Data.Properties; +using Ringtoets.MacroStabilityInwards.Primitives; + +namespace Ringtoets.MacroStabilityInwards.Data +{ + /// + /// Class that holds all piping calculation specific input parameters, i.e.. the values + /// that can differ across various calculations. + /// + public class MacroStabilityInwardsInput : Observable, ICalculationInput + { + private readonly GeneralPipingInput generalInputParameters; + private readonly NormalDistribution phreaticLevelExit; + private readonly LogNormalDistribution dampingFactorExit; + private RoundedDouble exitPointL; + private RoundedDouble entryPointL; + private RingtoetsPipingSurfaceLine surfaceLine; + private RoundedDouble assessmentLevel; + private bool useAssessmentLevelManualInput; + + /// + /// Initializes a new instance of the class. + /// + /// General piping calculation parameters that + /// are the same across all piping calculations. + /// Thrown when + /// is null. + public MacroStabilityInwardsInput(GeneralPipingInput generalInputParameters) + { + if (generalInputParameters == null) + { + throw new ArgumentNullException(nameof(generalInputParameters)); + } + + this.generalInputParameters = generalInputParameters; + + exitPointL = new RoundedDouble(2, double.NaN); + entryPointL = new RoundedDouble(2, double.NaN); + + phreaticLevelExit = new NormalDistribution(3) + { + StandardDeviation = (RoundedDouble) 0.1 + }; + dampingFactorExit = new LogNormalDistribution(3) + { + Mean = (RoundedDouble) 0.7, + StandardDeviation = (RoundedDouble) 0.1 + }; + + assessmentLevel = new RoundedDouble(2, double.NaN); + useAssessmentLevelManualInput = false; + } + + /// + /// Gets or sets the l-coordinate of the entry point, which, together with + /// the l-coordinate of the exit point, is used to determine the seepage + /// length of . + /// [m] + /// + /// Thrown when either: + /// + /// is smaller or equal to . + /// does not fall within the local X-coordinate range of + /// + /// + public RoundedDouble EntryPointL + { + get + { + return entryPointL; + } + set + { + RoundedDouble newEntryPointL = value.ToPrecision(entryPointL.NumberOfDecimalPlaces); + + if (!double.IsNaN(newEntryPointL)) + { + if (!double.IsNaN(exitPointL)) + { + ValidateEntryExitPoint(newEntryPointL, exitPointL); + } + + if (surfaceLine != null) + { + ValidatePointOnSurfaceLine(newEntryPointL); + } + } + + entryPointL = newEntryPointL; + } + } + + /// + /// Gets or sets the l-coordinate of the exit point, which, together with + /// the l-coordinate of the entry point, is used to determine the seepage + /// length of . + /// [m] + /// + /// Thrown when either: + /// + /// is smaller or equal to . + /// does not fall within the local X-coordinate range of + /// + /// + public RoundedDouble ExitPointL + { + get + { + return exitPointL; + } + set + { + RoundedDouble newExitPointL = value.ToPrecision(exitPointL.NumberOfDecimalPlaces); + + if (!double.IsNaN(newExitPointL)) + { + if (!double.IsNaN(entryPointL)) + { + ValidateEntryExitPoint(entryPointL, newExitPointL); + } + + if (surfaceLine != null) + { + ValidatePointOnSurfaceLine(newExitPointL); + } + } + + exitPointL = newExitPointL; + } + } + + /// + /// Gets or sets the surface line. + /// + public RingtoetsPipingSurfaceLine SurfaceLine + { + get + { + return surfaceLine; + } + set + { + surfaceLine = value; + SynchronizeEntryAndExitPointInput(); + } + } + + /// + /// Gets or sets the stochastic soil model which is linked to the . + /// + public StochasticSoilModel StochasticSoilModel { get; set; } + + /// + /// Gets or sets the profile which contains a 1 dimensional definition of soil layers with properties. + /// + public StochasticSoilProfile StochasticSoilProfile { get; set; } + + /// + /// Gets or sets the hydraulic boundary location from which to use the assessment level. + /// + public HydraulicBoundaryLocation HydraulicBoundaryLocation { get; set; } + + /// + /// Gets or sets whether the assessment level is manual input for the calculation. + /// + public bool UseAssessmentLevelManualInput + { + get + { + return useAssessmentLevelManualInput; + } + set + { + useAssessmentLevelManualInput = value; + + if (useAssessmentLevelManualInput) + { + HydraulicBoundaryLocation = null; + } + } + } + + /// + /// Gets the value true if the entry point and exit point of the + /// instance of match the entry point and + /// exit point of ; or false if this is + /// not the case, or if there is no assigned. + /// + public bool IsEntryAndExitPointInputSynchronized + { + get + { + if (SurfaceLine == null) + { + return false; + } + + double newEntryPointL; + double newExitPointL; + GetEntryExitPointFromSurfaceLine(out newEntryPointL, out newExitPointL); + + return Math.Abs(newEntryPointL - EntryPointL) < 1e-6 + && Math.Abs(newExitPointL - ExitPointL) < 1e-6; + } + } + + /// + /// Applies the entry point and exit point of the to the + /// parameters of the instance of . + /// + /// When no surface line is present, the entry and exit point are set to . + public void SynchronizeEntryAndExitPointInput() + { + if (SurfaceLine == null) + { + EntryPointL = RoundedDouble.NaN; + ExitPointL = RoundedDouble.NaN; + } + else + { + double tempEntryPointL; + double tempExitPointL; + GetEntryExitPointFromSurfaceLine(out tempEntryPointL, out tempExitPointL); + + if (tempExitPointL <= ExitPointL) + { + EntryPointL = (RoundedDouble) tempEntryPointL; + ExitPointL = (RoundedDouble) tempExitPointL; + } + else + { + ExitPointL = (RoundedDouble) tempExitPointL; + EntryPointL = (RoundedDouble) tempEntryPointL; + } + } + } + + private void GetEntryExitPointFromSurfaceLine(out double tempEntryPointL, out double tempExitPointL) + { + int entryPointIndex = Array.IndexOf(SurfaceLine.Points, SurfaceLine.DikeToeAtRiver); + int exitPointIndex = Array.IndexOf(SurfaceLine.Points, SurfaceLine.DikeToeAtPolder); + + Point2D[] localGeometry = SurfaceLine.ProjectGeometryToLZ().ToArray(); + + tempEntryPointL = localGeometry[0].X; + tempExitPointL = localGeometry[localGeometry.Length - 1].X; + + bool isDifferentPoints = entryPointIndex < 0 || exitPointIndex < 0 || entryPointIndex < exitPointIndex; + if (isDifferentPoints && exitPointIndex > 0) + { + tempExitPointL = localGeometry.ElementAt(exitPointIndex).X; + } + if (isDifferentPoints && entryPointIndex > -1) + { + tempEntryPointL = localGeometry.ElementAt(entryPointIndex).X; + } + } + + private void ValidateEntryExitPoint(RoundedDouble entryPointLocalXCoordinate, RoundedDouble exitPointLocalXCoordinate) + { + if (entryPointLocalXCoordinate >= exitPointLocalXCoordinate) + { + throw new ArgumentOutOfRangeException(null, Resources.PipingInput_EntryPointL_greater_or_equal_to_ExitPointL); + } + } + + private void ValidatePointOnSurfaceLine(RoundedDouble newLocalXCoordinate) + { + if (!surfaceLine.ValidateInRange(newLocalXCoordinate)) + { + var validityRange = new Range(surfaceLine.LocalGeometry.First().X, surfaceLine.LocalGeometry.Last().X); + string outOfRangeMessage = string.Format(Resources.PipingInput_ValidatePointOnSurfaceLine_Length_must_be_in_Range_0_, + validityRange.ToString(FormattableConstants.ShowAtLeastOneDecimal, CultureInfo.CurrentCulture)); + throw new ArgumentOutOfRangeException(null, outOfRangeMessage); + } + } + + #region Derived input + + /// + /// Gets or sets the outside high water level. + /// [m] + /// + /// Thrown when the user attempts to set the + /// assessment level while is false + public RoundedDouble AssessmentLevel + { + get + { + if (!UseAssessmentLevelManualInput) + { + return HydraulicBoundaryLocation?.DesignWaterLevel ?? new RoundedDouble(2, double.NaN); + } + + return assessmentLevel; + } + set + { + if (!UseAssessmentLevelManualInput) + { + throw new InvalidOperationException("UseAssessmentLevelManualInput is false"); + } + + assessmentLevel = value.ToPrecision(assessmentLevel.NumberOfDecimalPlaces); + } + } + + /// + /// Gets the piezometric head at the exit point. + /// [m] + /// + public RoundedDouble PiezometricHeadExit + { + get + { + return new DerivedPipingInput(this).PiezometricHeadExit; + } + } + + #endregion + + #region General input parameters + + /// + /// Gets the reduction factor Sellmeijer. + /// + public double SellmeijerReductionFactor + { + get + { + return generalInputParameters.SellmeijerReductionFactor; + } + } + + /// + /// Gets the volumetric weight of water. + /// [kN/m³] + /// + public double WaterVolumetricWeight + { + get + { + return generalInputParameters.WaterVolumetricWeight; + } + } + + /// + /// Gets the (lowerbound) volumic weight of sand grain material of a sand layer under water. + /// [kN/m³] + /// + public double SandParticlesVolumicWeight + { + get + { + return generalInputParameters.SandParticlesVolumicWeight; + } + } + + /// + /// Gets the White's drag coefficient. + /// + public double WhitesDragCoefficient + { + get + { + return generalInputParameters.WhitesDragCoefficient; + } + } + + /// + /// Gets the kinematic viscosity of water at 10 °C. + /// [m²/s] + /// + public double WaterKinematicViscosity + { + get + { + return generalInputParameters.WaterKinematicViscosity; + } + } + + /// + /// Gets the gravitational acceleration. + /// [m/s²] + /// + public double Gravity + { + get + { + return generalInputParameters.Gravity; + } + } + + /// + /// Gets the mean diameter of small scale tests applied to different kinds of sand, on which the formula of Sellmeijer has been fit. + /// [m] + /// + public double MeanDiameter70 + { + get + { + return generalInputParameters.MeanDiameter70; + } + } + + /// + /// Gets the angle of the force balance representing the amount in which sand grains resist rolling. + /// [°] + /// + public double BeddingAngle + { + get + { + return generalInputParameters.BeddingAngle; + } + } + + /// + /// Gets the calculation value used to account for uncertainty in the model for uplift. + /// + public double UpliftModelFactor + { + get + { + return generalInputParameters.UpliftModelFactor; + } + } + + /// + /// Gets the calculation value used to account for uncertainty in the model for Sellmeijer. + /// + public double SellmeijerModelFactor + { + get + { + return generalInputParameters.SellmeijerModelFactor; + } + } + + /// + /// Gets the critical exit gradient for heave. + /// + public double CriticalHeaveGradient + { + get + { + return generalInputParameters.CriticalHeaveGradient; + } + } + + #endregion + + #region Probabilistic parameters + + /// + /// Gets or sets the phreatic level at the exit point. + /// [m] + /// + public NormalDistribution PhreaticLevelExit + { + get + { + return phreaticLevelExit; + } + set + { + phreaticLevelExit.Mean = value.Mean; + phreaticLevelExit.StandardDeviation = value.StandardDeviation; + } + } + + /// + /// Gets the horizontal distance between entry and exit point. + /// [m] + /// + public VariationCoefficientLogNormalDistribution SeepageLength + { + get + { + return new DerivedPipingInput(this).SeepageLength; + } + } + + /// + /// Gets the sieve size through which 70% of the grains of the top part of the aquifer pass. + /// [m] + /// + public VariationCoefficientLogNormalDistribution Diameter70 + { + get + { + return new DerivedPipingInput(this).DiameterD70; + } + } + + /// + /// Gets the Darcy-speed with which water flows through the aquifer layer. + /// [m/s] + /// + public VariationCoefficientLogNormalDistribution DarcyPermeability + { + get + { + return new DerivedPipingInput(this).DarcyPermeability; + } + } + + /// + /// Gets the total thickness of the aquifer layers at the exit point. + /// [m] + /// + public LogNormalDistribution ThicknessAquiferLayer + { + get + { + return new DerivedPipingInput(this).ThicknessAquiferLayer; + } + } + + /// + /// Gets the total thickness of the coverage layer at the exit point. + /// [m] + /// + public LogNormalDistribution ThicknessCoverageLayer + { + get + { + return new DerivedPipingInput(this).ThicknessCoverageLayer; + } + } + + /// + /// Gets the effective thickness of the coverage layer at the exit point. + /// [m] + /// + public LogNormalDistribution EffectiveThicknessCoverageLayer + { + get + { + return new DerivedPipingInput(this).EffectiveThicknessCoverageLayer; + } + } + + /// + /// Gets or sets the damping factor at the exit point. + /// + public LogNormalDistribution DampingFactorExit + { + get + { + return dampingFactorExit; + } + set + { + dampingFactorExit.Mean = value.Mean; + dampingFactorExit.StandardDeviation = value.StandardDeviation; + } + } + + /// + /// Gets the volumic weight of the saturated coverage layer. + /// + public LogNormalDistribution SaturatedVolumicWeightOfCoverageLayer + { + get + { + return new DerivedPipingInput(this).SaturatedVolumicWeightOfCoverageLayer; + } + } + + #endregion + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/PipingCalculation.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/PipingCalculation.cs (.../PipingCalculation.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/PipingCalculation.cs (.../PipingCalculation.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -41,14 +41,14 @@ public PipingCalculation(GeneralPipingInput generalInputParameters) { Name = RingtoetsCommonDataResources.Calculation_DefaultName; - InputParameters = new PipingInput(generalInputParameters); + InputParameters = new MacroStabilityInwardsInput(generalInputParameters); Comments = new Comment(); } /// - /// Gets the input parameters to perform a piping calculation with. + /// Gets the input parameters to perform a macro stability inwards calculation with. /// - public PipingInput InputParameters { get; private set; } + public MacroStabilityInwardsInput InputParameters { get; private set; } /// /// Gets or sets , which contains the results of a piping calculation. Fisheye: Tag 0bd99fbcdd44bb84757a0270af6f5085dbd76648 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/PipingInput.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/PipingSemiProbabilisticDesignValueFactory.cs =================================================================== diff -u -r97146c91bad15a5bbe0aa62b7aac588c35ad724d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/PipingSemiProbabilisticDesignValueFactory.cs (.../PipingSemiProbabilisticDesignValueFactory.cs) (revision 97146c91bad15a5bbe0aa62b7aac588c35ad724d) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/PipingSemiProbabilisticDesignValueFactory.cs (.../PipingSemiProbabilisticDesignValueFactory.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -61,9 +61,9 @@ #region General parameters /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static DesignVariable GetSaturatedVolumicWeightOfCoverageLayer(PipingInput parameters) + public static DesignVariable GetSaturatedVolumicWeightOfCoverageLayer(MacroStabilityInwardsInput parameters) { if (double.IsNaN(parameters.ThicknessCoverageLayer.Mean)) { @@ -73,9 +73,9 @@ } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static DesignVariable GetThicknessCoverageLayer(PipingInput parameters) + public static DesignVariable GetThicknessCoverageLayer(MacroStabilityInwardsInput parameters) { if (double.IsNaN(parameters.ThicknessCoverageLayer.Mean)) { @@ -85,9 +85,9 @@ } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static DesignVariable GetEffectiveThicknessCoverageLayer(PipingInput parameters) + public static DesignVariable GetEffectiveThicknessCoverageLayer(MacroStabilityInwardsInput parameters) { if (double.IsNaN(parameters.ThicknessCoverageLayer.Mean)) { @@ -97,17 +97,17 @@ } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static DesignVariable GetPhreaticLevelExit(PipingInput parameters) + public static DesignVariable GetPhreaticLevelExit(MacroStabilityInwardsInput parameters) { return CreateDesignVariable(parameters.PhreaticLevelExit, 0.05); } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static DesignVariable GetDampingFactorExit(PipingInput parameters) + public static DesignVariable GetDampingFactorExit(MacroStabilityInwardsInput parameters) { return CreateDesignVariable(parameters.DampingFactorExit, 0.95); } @@ -117,33 +117,33 @@ #region Piping parameters /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetSeepageLength(PipingInput parameters) + public static VariationCoefficientDesignVariable GetSeepageLength(MacroStabilityInwardsInput parameters) { return CreateDesignVariable(parameters.SeepageLength, 0.05); } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetDiameter70(PipingInput parameters) + public static VariationCoefficientDesignVariable GetDiameter70(MacroStabilityInwardsInput parameters) { return CreateDesignVariable(parameters.Diameter70, 0.05); } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetDarcyPermeability(PipingInput parameters) + public static VariationCoefficientDesignVariable GetDarcyPermeability(MacroStabilityInwardsInput parameters) { return CreateDesignVariable(parameters.DarcyPermeability, 0.95); } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static DesignVariable GetThicknessAquiferLayer(PipingInput parameters) + public static DesignVariable GetThicknessAquiferLayer(MacroStabilityInwardsInput parameters) { return CreateDesignVariable(parameters.ThicknessAquiferLayer, 0.95); } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj =================================================================== diff -u -ra4f43954cde9fe753635bc71ab7b44eba5ef46db -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision a4f43954cde9fe753635bc71ab7b44eba5ef46db) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -53,7 +53,7 @@ - + Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/PipingChartDataPointsFactory.cs =================================================================== diff -u -r5800a09eb6e8df7b15aa734f06d36505329b157e -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/PipingChartDataPointsFactory.cs (.../PipingChartDataPointsFactory.cs) (revision 5800a09eb6e8df7b15aa734f06d36505329b157e) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/PipingChartDataPointsFactory.cs (.../PipingChartDataPointsFactory.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -47,43 +47,43 @@ } /// - /// Create an entry point in 2D space based on the provided . + /// Create an entry point in 2D space based on the provided . /// - /// The to create the entry point for. + /// The to create the entry point for. /// An array with an entry point in 2D space or an empty array when: /// - /// is null; - /// the in is null; - /// the entry point in equals double.NaN. + /// is null; + /// the in is null; + /// the entry point in equals double.NaN. /// /// - public static Point2D[] CreateEntryPointPoint(PipingInput pipingInput) + public static Point2D[] CreateEntryPointPoint(MacroStabilityInwardsInput macroStabilityInwardsInput) { - return pipingInput?.SurfaceLine != null && !double.IsNaN(pipingInput.EntryPointL) + return macroStabilityInwardsInput?.SurfaceLine != null && !double.IsNaN(macroStabilityInwardsInput.EntryPointL) ? new[] { - new Point2D(pipingInput.EntryPointL, pipingInput.SurfaceLine.GetZAtL(pipingInput.EntryPointL)) + new Point2D(macroStabilityInwardsInput.EntryPointL, macroStabilityInwardsInput.SurfaceLine.GetZAtL(macroStabilityInwardsInput.EntryPointL)) } : new Point2D[0]; } /// - /// Create an exit point in 2D space based on the provided . + /// Create an exit point in 2D space based on the provided . /// - /// The to create the exit point for. + /// The to create the exit point for. /// An array with an exit point in 2D space or an empty array when: /// - /// is null; - /// the in is null; - /// the exit point in equals double.NaN. + /// is null; + /// the in is null; + /// the exit point in equals double.NaN. /// /// - public static Point2D[] CreateExitPointPoint(PipingInput pipingInput) + public static Point2D[] CreateExitPointPoint(MacroStabilityInwardsInput macroStabilityInwardsInput) { - return pipingInput?.SurfaceLine != null && !double.IsNaN(pipingInput.ExitPointL) + return macroStabilityInwardsInput?.SurfaceLine != null && !double.IsNaN(macroStabilityInwardsInput.ExitPointL) ? new[] { - new Point2D(pipingInput.ExitPointL, pipingInput.SurfaceLine.GetZAtL(pipingInput.ExitPointL)) + new Point2D(macroStabilityInwardsInput.ExitPointL, macroStabilityInwardsInput.SurfaceLine.GetZAtL(macroStabilityInwardsInput.ExitPointL)) } : new Point2D[0]; } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/PipingContext.cs =================================================================== diff -u -rf967603d23371a8774cc6917e1feeb94009d30f5 -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/PipingContext.cs (.../PipingContext.cs) (revision f967603d23371a8774cc6917e1feeb94009d30f5) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/PipingContext.cs (.../PipingContext.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -63,19 +63,19 @@ /// /// Gets the available piping surface lines in order for the user to select one to - /// set . + /// set . /// public IEnumerable AvailablePipingSurfaceLines { get; private set; } /// /// Gets the available stochastic soil models in order for the user to select a and - /// to set and . + /// to set and . /// public IEnumerable AvailableStochasticSoilModels { get; private set; } /// /// Gets the available hydraulic boundary locations in order for the user to select one to - /// set . + /// set . /// public IEnumerable AvailableHydraulicBoundaryLocations { Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/PipingInputContext.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/PipingInputContext.cs (.../PipingInputContext.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/PipingInputContext.cs (.../PipingInputContext.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -28,29 +28,29 @@ namespace Ringtoets.MacroStabilityInwards.Forms.PresentationObjects { /// - /// A presentation layer object wrapping an instance of + /// A presentation layer object wrapping an instance of /// and allowing for selecting a surfaceline or soil profile based on data available /// in a piping failure mechanism. /// - public class PipingInputContext : PipingContext + public class PipingInputContext : PipingContext { /// /// Creates a new instance of /// - /// The piping input instance wrapped by this context object. - /// The calculation scenario the belongs to. + /// The piping input instance wrapped by this context object. + /// The calculation scenario the belongs to. /// The surface lines available within the piping context. /// The stochastic soil models available within the piping context. /// The failure mechanism which the piping context belongs to. /// The assessment section which the piping context belongs to. /// Thrown when any input argument is null. - public PipingInputContext(PipingInput pipingInput, + public PipingInputContext(MacroStabilityInwardsInput macroStabilityInwardsInput, PipingCalculationScenario calculation, IEnumerable surfaceLines, IEnumerable stochasticSoilModels, MacroStabilityInwardsFailureMechanism macroStabilityInwardsFailureMechanism, IAssessmentSection assessmentSection) - : base(pipingInput, surfaceLines, stochasticSoilModels, macroStabilityInwardsFailureMechanism, assessmentSection) + : base(macroStabilityInwardsInput, surfaceLines, stochasticSoilModels, macroStabilityInwardsFailureMechanism, assessmentSection) { if (calculation == null) { Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsFailureMechanismView.cs =================================================================== diff -u -r3809c6118ac872eb58b77f0cf808e7a2a1714a3e -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsFailureMechanismView.cs (.../MacroStabilityInwardsFailureMechanismView.cs) (revision 3809c6118ac872eb58b77f0cf808e7a2a1714a3e) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsFailureMechanismView.cs (.../MacroStabilityInwardsFailureMechanismView.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -50,7 +50,7 @@ private readonly Observer surfaceLinesObserver; private readonly Observer stochasticSoilModelsObserver; - private readonly RecursiveObserver calculationInputObserver; + private readonly RecursiveObserver calculationInputObserver; private readonly RecursiveObserver calculationGroupObserver; private readonly RecursiveObserver calculationObserver; private readonly RecursiveObserver surfaceLineObserver; @@ -88,7 +88,7 @@ surfaceLinesObserver = new Observer(UpdateSurfaceLinesMapData); stochasticSoilModelsObserver = new Observer(UpdateStochasticSoilModelsMapData); - calculationInputObserver = new RecursiveObserver( + calculationInputObserver = new RecursiveObserver( UpdateCalculationsMapData, pcg => pcg.Children.Concat(pcg.Children.OfType().Select(pc => pc.InputParameters))); calculationGroupObserver = new RecursiveObserver(UpdateCalculationsMapData, pcg => pcg.Children); calculationObserver = new RecursiveObserver(UpdateCalculationsMapData, pcg => pcg.Children); Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/PipingCalculationsView.cs =================================================================== diff -u -r26fde08dff31104fdc204b8fab78a61adaa214d6 -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/PipingCalculationsView.cs (.../PipingCalculationsView.cs) (revision 26fde08dff31104fdc204b8fab78a61adaa214d6) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/PipingCalculationsView.cs (.../PipingCalculationsView.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -52,7 +52,7 @@ private const int selectableHydraulicBoundaryLocationColumnIndex = 4; private readonly Observer assessmentSectionObserver; - private readonly RecursiveObserver pipingInputObserver; + private readonly RecursiveObserver pipingInputObserver; private readonly RecursiveObserver pipingCalculationGroupObserver; private readonly RecursiveObserver pipingCalculationObserver; private readonly Observer failureMechanismObserver; @@ -79,7 +79,7 @@ failureMechanismObserver = new Observer(OnFailureMechanismUpdate); assessmentSectionObserver = new Observer(UpdateSelectableHydraulicBoundaryLocationsColumn); // The concat is needed to observe the input of calculations in child groups. - pipingInputObserver = new RecursiveObserver(UpdateDataGridViewDataSource, pcg => pcg.Children.Concat(pcg.Children.OfType().Select(pc => pc.InputParameters))); + pipingInputObserver = new RecursiveObserver(UpdateDataGridViewDataSource, pcg => pcg.Children.Concat(pcg.Children.OfType().Select(pc => pc.InputParameters))); pipingCalculationGroupObserver = new RecursiveObserver(UpdateDataGridViewDataSource, pcg => pcg.Children); pipingCalculationObserver = new RecursiveObserver(dataGridViewControl.RefreshDataGridView, pcg => pcg.Children); Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/PipingInputView.cs =================================================================== diff -u -r5800a09eb6e8df7b15aa734f06d36505329b157e -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/PipingInputView.cs (.../PipingInputView.cs) (revision 5800a09eb6e8df7b15aa734f06d36505329b157e) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/PipingInputView.cs (.../PipingInputView.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -179,7 +179,7 @@ private void SetChartData() { - PipingInput pipingInput = data.InputParameters; + MacroStabilityInwardsInput macroStabilityInwardsInput = data.InputParameters; RingtoetsPipingSurfaceLine surfaceLine = data.InputParameters.SurfaceLine; PipingChartDataFactory.UpdateSurfaceLineChartDataName(surfaceLineChartData, surfaceLine); @@ -191,8 +191,8 @@ ditchDikeSideChartData.Points = PipingChartDataPointsFactory.CreateDitchDikeSidePoint(surfaceLine); dikeToeAtPolderChartData.Points = PipingChartDataPointsFactory.CreateDikeToeAtPolderPoint(surfaceLine); dikeToeAtRiverChartData.Points = PipingChartDataPointsFactory.CreateDikeToeAtRiverPoint(surfaceLine); - exitPointChartData.Points = PipingChartDataPointsFactory.CreateExitPointPoint(pipingInput); - entryPointChartData.Points = PipingChartDataPointsFactory.CreateEntryPointPoint(pipingInput); + exitPointChartData.Points = PipingChartDataPointsFactory.CreateExitPointPoint(macroStabilityInwardsInput); + entryPointChartData.Points = PipingChartDataPointsFactory.CreateEntryPointPoint(macroStabilityInwardsInput); SetSoilProfileChartData(); } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/PipingScenariosView.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/PipingScenariosView.cs (.../PipingScenariosView.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/PipingScenariosView.cs (.../PipingScenariosView.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -38,7 +38,7 @@ /// public partial class PipingScenariosView : UserControl, IView { - private readonly RecursiveObserver pipingInputObserver; + private readonly RecursiveObserver pipingInputObserver; private readonly RecursiveObserver pipingCalculationGroupObserver; private readonly RecursiveObserver pipingCalculationObserver; private readonly Observer pipingFailureMechanismObserver; @@ -57,7 +57,7 @@ pipingFailureMechanismObserver = new Observer(OnPipingFailureMechanismUpdate); // The concat is needed to observe the input of calculations in child groups. - pipingInputObserver = new RecursiveObserver(UpdateDataGridViewDataSource, pcg => pcg.Children.Concat(pcg.Children.OfType().Select(pc => pc.InputParameters))); + pipingInputObserver = new RecursiveObserver(UpdateDataGridViewDataSource, pcg => pcg.Children.Concat(pcg.Children.OfType().Select(pc => pc.InputParameters))); pipingCalculationGroupObserver = new RecursiveObserver(UpdateDataGridViewDataSource, pcg => pcg.Children); pipingCalculationObserver = new RecursiveObserver(dataGridViewControl.RefreshDataGridView, pcg => pcg.Children); } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Exporters/PipingCalculationConfigurationWriter.cs =================================================================== diff -u -rcbf104c75fe0dda56a0eab7a5f7ff60c89d8c112 -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Exporters/PipingCalculationConfigurationWriter.cs (.../PipingCalculationConfigurationWriter.cs) (revision cbf104c75fe0dda56a0eab7a5f7ff60c89d8c112) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Exporters/PipingCalculationConfigurationWriter.cs (.../PipingCalculationConfigurationWriter.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -39,7 +39,7 @@ writer.WriteStartElement(ConfigurationSchemaIdentifiers.CalculationElement); writer.WriteAttributeString(ConfigurationSchemaIdentifiers.NameAttribute, calculation.Name); - PipingInput calculationInputParameters = calculation.InputParameters; + MacroStabilityInwardsInput calculationInputParameters = calculation.InputParameters; if (calculationInputParameters.UseAssessmentLevelManualInput) { @@ -79,7 +79,7 @@ writer.WriteEndElement(); } - private static IDictionary CreateInputDistributions(PipingInput calculationInputParameters) + private static IDictionary CreateInputDistributions(MacroStabilityInwardsInput calculationInputParameters) { return new Dictionary { Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/RingtoetsPipingSurfaceLineUpdateDataStrategy.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/RingtoetsPipingSurfaceLineUpdateDataStrategy.cs (.../RingtoetsPipingSurfaceLineUpdateDataStrategy.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Plugin/FileImporter/RingtoetsPipingSurfaceLineUpdateDataStrategy.cs (.../RingtoetsPipingSurfaceLineUpdateDataStrategy.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -114,7 +114,7 @@ { IEnumerable matchingSoilModels = GetAvailableStochasticSoilModels(updatedSurfaceLine); - PipingInput calculationInput = calculation.InputParameters; + MacroStabilityInwardsInput calculationInput = calculation.InputParameters; PipingInputService.SetMatchingStochasticSoilModel(calculationInput, matchingSoilModels); affectedObjects.Add(calculationInput); } @@ -142,7 +142,7 @@ IEnumerable affectedCalculations = GetAffectedCalculationWithSurfaceLine(surfaceLine); foreach (PipingCalculation affectedCalculation in affectedCalculations) { - PipingInput inputParameters = affectedCalculation.InputParameters; + MacroStabilityInwardsInput inputParameters = affectedCalculation.InputParameters; if (!ValidateLocalCoordinateOnSurfaceLine(surfaceLine, inputParameters.EntryPointL)) { inputParameters.EntryPointL = RoundedDouble.NaN; Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/PipingCalculationService.cs =================================================================== diff -u -rcbf104c75fe0dda56a0eab7a5f7ff60c89d8c112 -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/PipingCalculationService.cs (.../PipingCalculationService.cs) (revision cbf104c75fe0dda56a0eab7a5f7ff60c89d8c112) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/PipingCalculationService.cs (.../PipingCalculationService.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -121,7 +121,7 @@ } } - private static List ValidateInput(PipingInput inputParameters) + private static List ValidateInput(MacroStabilityInwardsInput inputParameters) { var validationResults = new List(); @@ -143,7 +143,7 @@ return validationResults; } - private static IEnumerable ValidateHydraulics(PipingInput inputParameters) + private static IEnumerable ValidateHydraulics(MacroStabilityInwardsInput inputParameters) { var validationResults = new List(); if (!inputParameters.UseAssessmentLevelManualInput && inputParameters.HydraulicBoundaryLocation == null) @@ -163,7 +163,7 @@ return validationResults; } - private static IEnumerable ValidateAssessmentLevel(PipingInput inputParameters) + private static IEnumerable ValidateAssessmentLevel(MacroStabilityInwardsInput inputParameters) { var validationResult = new List(); @@ -182,7 +182,7 @@ return validationResult; } - private static IEnumerable ValidateCoreSurfaceLineAndSoilProfileProperties(PipingInput inputParameters) + private static IEnumerable ValidateCoreSurfaceLineAndSoilProfileProperties(MacroStabilityInwardsInput inputParameters) { var validationResults = new List(); if (inputParameters.SurfaceLine == null) @@ -200,7 +200,7 @@ return validationResults; } - private static IEnumerable ValidateSoilLayers(PipingInput inputParameters) + private static IEnumerable ValidateSoilLayers(MacroStabilityInwardsInput inputParameters) { var validationResults = new List(); if (double.IsNaN(inputParameters.ThicknessAquiferLayer.Mean)) @@ -216,7 +216,7 @@ return validationResults; } - private static IEnumerable ValidateAquiferLayers(PipingInput inputParameters, PipingSoilProfile pipingSoilProfile, double surfaceLevel) + private static IEnumerable ValidateAquiferLayers(MacroStabilityInwardsInput inputParameters, PipingSoilProfile pipingSoilProfile, double surfaceLevel) { var validationResult = new List(); @@ -240,7 +240,7 @@ return validationResult; } - private static IEnumerable ValidateCoverageLayers(PipingInput inputParameters, PipingSoilProfile pipingSoilProfile, double surfaceLevel) + private static IEnumerable ValidateCoverageLayers(MacroStabilityInwardsInput inputParameters, PipingSoilProfile pipingSoilProfile, double surfaceLevel) { var validationResult = new List(); @@ -263,7 +263,7 @@ return validationResult; } - private static List GetInputWarnings(PipingInput inputParameters) + private static List GetInputWarnings(MacroStabilityInwardsInput inputParameters) { var warnings = new List(); @@ -280,7 +280,7 @@ return warnings; } - private static IEnumerable GetThicknessCoverageLayerWarnings(PipingInput inputParameters) + private static IEnumerable GetThicknessCoverageLayerWarnings(MacroStabilityInwardsInput inputParameters) { var warnings = new List(); @@ -299,7 +299,7 @@ return warnings; } - private static IEnumerable GetDiameter70Warnings(PipingInput inputParameters) + private static IEnumerable GetDiameter70Warnings(MacroStabilityInwardsInput inputParameters) { var warnings = new List(); @@ -312,7 +312,7 @@ return warnings; } - private static IEnumerable GetMultipleCoverageLayersWarning(PipingInput inputParameters, double surfaceLineLevel) + private static IEnumerable GetMultipleCoverageLayersWarning(MacroStabilityInwardsInput inputParameters, double surfaceLineLevel) { var warnings = new List(); @@ -324,7 +324,7 @@ return warnings; } - private static IEnumerable GetMultipleAquiferLayersWarning(PipingInput inputParameters, double surfaceLineLevel) + private static IEnumerable GetMultipleAquiferLayersWarning(MacroStabilityInwardsInput inputParameters, double surfaceLineLevel) { var warnings = new List(); @@ -336,14 +336,14 @@ return warnings; } - private static bool IsSurfaceLineProfileDefinitionComplete(PipingInput surfaceLineMissing) + private static bool IsSurfaceLineProfileDefinitionComplete(MacroStabilityInwardsInput surfaceLineMissing) { return surfaceLineMissing.SurfaceLine != null && surfaceLineMissing.StochasticSoilProfile != null && !double.IsNaN(surfaceLineMissing.ExitPointL); } - private static PipingCalculatorInput CreateInputFromData(PipingInput inputParameters) + private static PipingCalculatorInput CreateInputFromData(MacroStabilityInwardsInput inputParameters) { return new PipingCalculatorInput( new PipingCalculatorInput.ConstructionProperties Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/PipingDataSynchronizationService.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/PipingDataSynchronizationService.cs (.../PipingDataSynchronizationService.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/PipingDataSynchronizationService.cs (.../PipingDataSynchronizationService.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -357,7 +357,7 @@ return pipingCalculationScenarios; } - private static IEnumerable ClearSurfaceLine(PipingInput input) + private static IEnumerable ClearSurfaceLine(MacroStabilityInwardsInput input) { input.SurfaceLine = null; return new[] @@ -366,7 +366,7 @@ }; } - private static IEnumerable ClearStochasticSoilModel(PipingInput input) + private static IEnumerable ClearStochasticSoilModel(MacroStabilityInwardsInput input) { input.StochasticSoilModel = null; input.StochasticSoilProfile = null; @@ -377,7 +377,7 @@ }; } - private static IEnumerable ClearStochasticSoilProfile(PipingInput input) + private static IEnumerable ClearStochasticSoilProfile(MacroStabilityInwardsInput input) { input.StochasticSoilProfile = null; @@ -387,7 +387,7 @@ }; } - private static IEnumerable ClearHydraulicBoundaryLocation(PipingInput input) + private static IEnumerable ClearHydraulicBoundaryLocation(MacroStabilityInwardsInput input) { if (input.HydraulicBoundaryLocation != null) { Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/PipingInputService.cs =================================================================== diff -u -rcbf104c75fe0dda56a0eab7a5f7ff60c89d8c112 -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/PipingInputService.cs (.../PipingInputService.cs) (revision cbf104c75fe0dda56a0eab7a5f7ff60c89d8c112) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/PipingInputService.cs (.../PipingInputService.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -31,48 +31,48 @@ public static class PipingInputService { /// - /// Sets and that match the input of a calculation if there is one matching + /// Sets and that match the input of a calculation if there is one matching /// or respectively. /// - /// The input parameters to set the . + /// The input parameters to set the . /// The available stochastic soil models. - public static void SetMatchingStochasticSoilModel(PipingInput pipingInput, IEnumerable availableStochasticSoilModels) + public static void SetMatchingStochasticSoilModel(MacroStabilityInwardsInput macroStabilityInwardsInput, IEnumerable availableStochasticSoilModels) { List available = availableStochasticSoilModels.ToList(); if (available.Count == 1) { - pipingInput.StochasticSoilModel = available.First(); + macroStabilityInwardsInput.StochasticSoilModel = available.First(); } - else if (!available.Any() || !available.Contains(pipingInput.StochasticSoilModel)) + else if (!available.Any() || !available.Contains(macroStabilityInwardsInput.StochasticSoilModel)) { - pipingInput.StochasticSoilModel = null; + macroStabilityInwardsInput.StochasticSoilModel = null; } - SyncStochasticSoilProfileWithStochasticSoilModel(pipingInput); + SyncStochasticSoilProfileWithStochasticSoilModel(macroStabilityInwardsInput); } /// - /// Sets the to the corresponding : + /// Sets the to the corresponding : /// - /// null if no is set. - /// The first element of when it is the only element. + /// null if no is set. + /// The first element of when it is the only element. /// /// - /// The input parameters to set the . - public static void SyncStochasticSoilProfileWithStochasticSoilModel(PipingInput pipingInput) + /// The input parameters to set the . + public static void SyncStochasticSoilProfileWithStochasticSoilModel(MacroStabilityInwardsInput macroStabilityInwardsInput) { - if (pipingInput.StochasticSoilModel != null) + if (macroStabilityInwardsInput.StochasticSoilModel != null) { - if (pipingInput.StochasticSoilModel.StochasticSoilProfiles.Count == 1) + if (macroStabilityInwardsInput.StochasticSoilModel.StochasticSoilProfiles.Count == 1) { - pipingInput.StochasticSoilProfile = pipingInput.StochasticSoilModel.StochasticSoilProfiles.First(); + macroStabilityInwardsInput.StochasticSoilProfile = macroStabilityInwardsInput.StochasticSoilModel.StochasticSoilProfiles.First(); return; } - if (pipingInput.StochasticSoilProfile == null || pipingInput.StochasticSoilModel.StochasticSoilProfiles.Contains(pipingInput.StochasticSoilProfile)) + if (macroStabilityInwardsInput.StochasticSoilProfile == null || macroStabilityInwardsInput.StochasticSoilModel.StochasticSoilProfiles.Contains(macroStabilityInwardsInput.StochasticSoilProfile)) { return; } } - pipingInput.StochasticSoilProfile = null; + macroStabilityInwardsInput.StochasticSoilProfile = null; } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/DerivedPipingInputTest.cs =================================================================== diff -u -r4a27dfb1033419dd325dee88fd4abe3cb56e452d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/DerivedPipingInputTest.cs (.../DerivedPipingInputTest.cs) (revision 4a27dfb1033419dd325dee88fd4abe3cb56e452d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/DerivedPipingInputTest.cs (.../DerivedPipingInputTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -42,15 +42,15 @@ TestDelegate call = () => new DerivedPipingInput(null); // Assert - const string expectedMessage = "Cannot create DerivedPipingInput without PipingInput."; + const string expectedMessage = "Cannot create DerivedPipingInput without MacroStabilityInwardsInput."; TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage); } [Test] public void Constructor_WithPipingInput_DoesNotThrow() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(1.0, 1.1); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(1.0, 1.1); // Call TestDelegate call = () => new DerivedPipingInput(input); @@ -63,7 +63,7 @@ public void PiezometricHeadExit_ValidInput_SetsParametersForCalculatorAndReturnsPiezometricHead() { // Setup - var input = new PipingInput(new GeneralPipingInput()); + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); var derivedInput = new DerivedPipingInput(input); using (new PipingSubCalculatorFactoryConfig()) @@ -90,7 +90,7 @@ public void PiezometricHeadExit_InputWithAssessmentLevelMissing_PiezometricHeadSetToNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(1.0, 1.0); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(1.0, 1.0); var derivedInput = new DerivedPipingInput(input); // Call @@ -104,7 +104,7 @@ public void EffectiveThicknessCoverageLayer_SoilProfileSingleAquiferAndCoverageUnderSurfaceLine_ReturnsThicknessCoverageLayer() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); // Call @@ -118,7 +118,7 @@ public void EffectiveThicknessCoverageLayer_InputWithoutSurfaceLine_MeansSetToNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.SurfaceLine = null; var derivedInput = new DerivedPipingInput(input); @@ -137,7 +137,7 @@ public void EffectiveThicknessCoverageLayer_SoilProfileSingleAquiferAboveSurfaceLine_ThicknessCoverageLayerNaN(double deltaAboveSurfaceLine) { // Setup - PipingInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); var derivedInput = new DerivedPipingInput(input); // Call @@ -151,7 +151,7 @@ public void EffectiveThicknessCoverageLayer_MeanSetSoilProfileSetToNull_ThicknessCoverageLayerNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ThicknessCoverageLayer.Mean = new RoundedDouble(2, new Random(21).NextDouble() + 1); var derivedInput = new DerivedPipingInput(input); @@ -170,7 +170,7 @@ public void EffectiveThicknessCoverageLayer_ProfileWithoutAquiferLayer_ThicknessCoverageLayerNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -194,7 +194,7 @@ public void EffectiveThicknessCoverageLayer_InputResultsInZeroCoverageThickness_ThicknessCoverageLayerNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -222,7 +222,7 @@ public void EffectiveThicknessCoverageLayer_InputWithoutSoilProfile_MeansSetToNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = null; var derivedInput = new DerivedPipingInput(input); @@ -237,7 +237,7 @@ public void ThicknessCoverageLayer_SoilProfileSingleAquiferAndCoverageUnderSurfaceLine_ReturnsThicknessCoverageLayer() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); // Call @@ -251,7 +251,7 @@ public void ThicknessCoverageLayer_InputWithoutSurfaceLine_MeansSetToNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.SurfaceLine = null; var derivedInput = new DerivedPipingInput(input); @@ -270,7 +270,7 @@ public void ThicknessCoverageLayer_SoilProfileSingleAquiferAboveSurfaceLine_ThicknessCoverageLayerNaN(double deltaAboveSurfaceLine) { // Setup - PipingInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); var derivedInput = new DerivedPipingInput(input); // Call @@ -284,7 +284,7 @@ public void ThicknessCoverageLayer_MeanSetSoilProfileSetToNull_ThicknessCoverageLayerNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ThicknessCoverageLayer.Mean = new RoundedDouble(2, new Random(21).NextDouble() + 1); var derivedInput = new DerivedPipingInput(input); @@ -303,7 +303,7 @@ public void ThicknessCoverageLayer_ProfileWithoutAquiferLayer_ThicknessCoverageLayerNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -327,7 +327,7 @@ public void ThicknessCoverageLayer_InputResultsInZeroCoverageThickness_ThicknessCoverageLayerNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -355,7 +355,7 @@ public void ThicknessCoverageLayer_InputWithoutSoilProfile_MeansSetToNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = null; var derivedInput = new DerivedPipingInput(input); @@ -370,7 +370,7 @@ public void ThicknessAquiferLayer_SoilProfileSingleAquiferAndCoverageUnderSurfaceLine_ReturnsMeanExpectedThicknessAquiferLayer() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); // Call @@ -384,7 +384,7 @@ public void ThicknessAquiferLayer_InputWithoutSoilProfile_ReturnMeanNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.StochasticSoilProfile = null; var derivedInput = new DerivedPipingInput(input); @@ -399,7 +399,7 @@ public void ThicknessAquiferLayer_InputWithoutSurfaceLine_ReturnMeanNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.SurfaceLine = null; var derivedInput = new DerivedPipingInput(input); @@ -418,7 +418,7 @@ public void ThicknessAquiferLayer_SoilProfileSingleAquiferAboveSurfaceLine_ReturnMeanNaN(double deltaAboveSurfaceLine) { // Setup - PipingInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); var derivedInput = new DerivedPipingInput(input); // Call @@ -433,7 +433,7 @@ { // Setup double expectedThickness; - PipingInput input = PipingInputFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedThickness); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedThickness); var derivedInput = new DerivedPipingInput(input); // Call @@ -447,7 +447,7 @@ public void ThicknessAquiferLayer_MeanSetExitPointSetToNaN_ReturnMeanNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ExitPointL = RoundedDouble.NaN; var derivedInput = new DerivedPipingInput(input); @@ -464,7 +464,7 @@ public void ThicknessAquiferLayer_ProfileWithoutAquiferLayer_ReturnMeanNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -488,7 +488,7 @@ public void ThicknessAquiferLayer_SoilProfileSingleAquiferUnderSurfaceLine_ReturnMeanExpectedThicknessAquiferLayer() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquifer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquifer(); var derivedInput = new DerivedPipingInput(input); // Call @@ -502,7 +502,7 @@ public void ThicknessAquiferLayer_MeanSetSoilProfileSetToNull_ReturnMeanNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = null; @@ -518,7 +518,7 @@ public void ThicknessAquiferLayer_InputResultsInZeroAquiferThickness_ReturnMeanNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -546,7 +546,7 @@ public void ThicknessAquiferLayer_SurfaceLineHalfWayProfileLayer_ConsecutiveThicknessSetToLayerHeightUnderSurfaceLine() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) { @@ -574,7 +574,7 @@ public void SeepageLength_ValidData_ReturnsSeepageLength() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); // Call @@ -589,7 +589,7 @@ public void SeepageLength_EntryPointNaN_SeepageLengthNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.EntryPointL = RoundedDouble.NaN; var derivedInput = new DerivedPipingInput(input); @@ -605,7 +605,7 @@ public void SeepageLength_ExitPointNaN_SeepageLengthNaN() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); input.ExitPointL = RoundedDouble.NaN; var derivedInput = new DerivedPipingInput(input); @@ -621,7 +621,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoSoilProfile_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = null; @@ -638,7 +638,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoStochasticSoilProfile_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = null; @@ -655,7 +655,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoSurfaceLine_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.SurfaceLine = null; @@ -672,7 +672,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoExitPointL_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.ExitPointL = RoundedDouble.NaN; @@ -689,7 +689,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoAquitardLayers_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -712,7 +712,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoAquiferLayers_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -735,7 +735,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_NoCoverageLayersAboveTopAquiferLayer_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -762,7 +762,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_SingleLayer_ReturnsWithParametersFromLayer() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); double belowPhreaticLevelMean = 0.1 + random.NextDouble(); @@ -795,7 +795,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_MultipleLayersEqualStandardDeviationAndShift_ReturnsWithWeightedMean() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); double belowPhreaticLevelMeanA = 0.1 + random.NextDouble(); @@ -843,7 +843,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_MultipleLayersInequalStandardDeviationOrShift_ReturnsNaNValues(double deviationDelta, double shiftDelta) { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); double belowPhreaticLevelMeanA = 0.1 + random.NextDouble(); @@ -883,7 +883,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_MultipleLayersInequalStandardDeviationOrShiftButEqualWhenRounded_ReturnsWithWeightedMean() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); const double belowPhreaticLevelMeanA = 2.5; const double belowPhreaticLevelMeanB = 3.4; @@ -920,7 +920,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_OneLayerWithIncorrectShiftMeanCombination_ReturnsNaNValues() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -949,7 +949,7 @@ public void SaturatedVolumicWeightOfCoverageLayer_MultipleLayersOneLayerWithIncorrectShiftMeanCombination_ReturnsNaNValues() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -984,7 +984,7 @@ public void DarcyPermeability_NoSoilProfile_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = null; @@ -1000,7 +1000,7 @@ public void DarcyPermeability_NoStochasticSoilProfile_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = null; @@ -1016,7 +1016,7 @@ public void DarcyPermeability_NoSurfaceLine_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.SurfaceLine = null; @@ -1032,7 +1032,7 @@ public void DarcyPermeability_NoExitPointL_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.ExitPointL = RoundedDouble.NaN; @@ -1048,7 +1048,7 @@ public void DarcyPermeability_NoAquiferLayers_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -1067,7 +1067,7 @@ public void DarcyPermeability_SingleLayerWithIncorrectMean_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", 0.0, new[] { @@ -1091,7 +1091,7 @@ public void DarcyPermeability_MultiplelayersWithOneIncorrectLayerMean_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", 0.0, new[] { @@ -1121,7 +1121,7 @@ public void DarcyPermeability_MultipleAquiferLayersWithSameVariation_ReturnsWithWeightedMean() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); @@ -1158,7 +1158,7 @@ public void DarcyPermeability_SingleAquiferLayerWithRandomMeanAndDeviation_ReturnsWithWeightedMean() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); double permeabilityMean = 0.1 + random.NextDouble(); @@ -1187,7 +1187,7 @@ public void DarcyPermeability_MultipleAquiferLayersWithDifferentMeanAndDeviation_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -1217,7 +1217,7 @@ public void DiameterD70_NoSoilProfile_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = null; @@ -1233,7 +1233,7 @@ public void DiameterD70_NoStochasticSoilProfile_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile = null; @@ -1249,7 +1249,7 @@ public void DiameterD70_NoSurfaceLine_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.SurfaceLine = null; @@ -1265,7 +1265,7 @@ public void DiameterD70_NoExitPointL_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.ExitPointL = RoundedDouble.NaN; @@ -1281,7 +1281,7 @@ public void DiameterD70_NoAquiferLayers_ReturnsNaNForParameters() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); input.StochasticSoilProfile.SoilProfile = new PipingSoilProfile("", -2.0, new[] { @@ -1300,7 +1300,7 @@ public void DiameterD70_SingleAquiferLayers_ReturnsWithParametersFromLayer() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); var random = new Random(21); double diameterD70Mean = 0.1 + random.NextDouble(); @@ -1327,7 +1327,7 @@ public void DiameterD70_MultipleAquiferLayers_ReturnsWithParametersFromTopmostLayer() { // Setup - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); var derivedInput = new DerivedPipingInput(input); const double diameterD70Mean = 0.5; const double diameterD70CoefficientOfVariation = 0.2; Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsInputTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsInputTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsInputTest.cs (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -0,0 +1,1297 @@ +// Copyright (C) Stichting Deltares 2017. 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 System; +using System.Collections.Generic; +using Core.Common.Base; +using Core.Common.Base.Data; +using Core.Common.Base.Geometry; +using Core.Common.TestUtil; +using NUnit.Framework; +using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.Probabilistics; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.MacroStabilityInwards.Data.TestUtil; +using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator; +using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator; +using Ringtoets.MacroStabilityInwards.Primitives; + +namespace Ringtoets.MacroStabilityInwards.Data.Test +{ + [TestFixture] + public class MacroStabilityInwardsInputTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var phreaticLevelExit = new NormalDistribution(3) + { + Mean = (RoundedDouble) 0, + StandardDeviation = (RoundedDouble) 0.1 + }; + + var dampingFactorExit = new LogNormalDistribution(3) + { + Mean = (RoundedDouble) 0.7, + StandardDeviation = (RoundedDouble) 0.1 + }; + + var diameter70 = new VariationCoefficientLogNormalDistribution(6) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }; + + var darcyPermeability = new VariationCoefficientLogNormalDistribution(6) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = RoundedDouble.NaN + }; + + var thicknessCoverageLayer = new LogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + StandardDeviation = (RoundedDouble) 0.5 + }; + + var effectiveThicknessCoverageLayer = new LogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + StandardDeviation = (RoundedDouble) 0.5 + }; + + var saturatedVolumicWeightOfCoverageLayer = new LogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + StandardDeviation = RoundedDouble.NaN, + Shift = RoundedDouble.NaN + }; + + var thicknessAquiferLayer = new LogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + StandardDeviation = (RoundedDouble) 0.5 + }; + + var seepageLength = new VariationCoefficientLogNormalDistribution(2) + { + Mean = RoundedDouble.NaN, + CoefficientOfVariation = (RoundedDouble) 0.1 + }; + + var generalInputParameters = new GeneralPipingInput(); + + // Call + var inputParameters = new MacroStabilityInwardsInput(generalInputParameters); + + // Assert + Assert.IsInstanceOf(inputParameters); + Assert.IsInstanceOf(inputParameters); + + DistributionAssert.AreEqual(phreaticLevelExit, inputParameters.PhreaticLevelExit); + DistributionAssert.AreEqual(dampingFactorExit, inputParameters.DampingFactorExit); + DistributionAssert.AreEqual(diameter70, inputParameters.Diameter70); + DistributionAssert.AreEqual(darcyPermeability, inputParameters.DarcyPermeability); + + Assert.IsNull(inputParameters.SurfaceLine); + Assert.IsNull(inputParameters.StochasticSoilModel); + Assert.IsNull(inputParameters.StochasticSoilProfile); + Assert.IsNull(inputParameters.HydraulicBoundaryLocation); + + Assert.AreEqual(generalInputParameters.UpliftModelFactor, inputParameters.UpliftModelFactor); + Assert.AreEqual(generalInputParameters.SellmeijerModelFactor, inputParameters.SellmeijerModelFactor); + Assert.AreEqual(generalInputParameters.CriticalHeaveGradient, inputParameters.CriticalHeaveGradient); + Assert.AreEqual(generalInputParameters.SellmeijerReductionFactor, inputParameters.SellmeijerReductionFactor); + Assert.AreEqual(generalInputParameters.Gravity, inputParameters.Gravity); + Assert.AreEqual(generalInputParameters.WaterKinematicViscosity, inputParameters.WaterKinematicViscosity); + Assert.AreEqual(generalInputParameters.WaterVolumetricWeight, inputParameters.WaterVolumetricWeight); + Assert.AreEqual(generalInputParameters.SandParticlesVolumicWeight, inputParameters.SandParticlesVolumicWeight); + Assert.AreEqual(generalInputParameters.WhitesDragCoefficient, inputParameters.WhitesDragCoefficient); + Assert.AreEqual(generalInputParameters.BeddingAngle, inputParameters.BeddingAngle); + Assert.AreEqual(generalInputParameters.MeanDiameter70, inputParameters.MeanDiameter70); + + DistributionAssert.AreEqual(thicknessCoverageLayer, inputParameters.ThicknessCoverageLayer); + DistributionAssert.AreEqual(effectiveThicknessCoverageLayer, inputParameters.EffectiveThicknessCoverageLayer); + + DistributionAssert.AreEqual(saturatedVolumicWeightOfCoverageLayer, inputParameters.SaturatedVolumicWeightOfCoverageLayer); + Assert.AreEqual(2, inputParameters.SaturatedVolumicWeightOfCoverageLayer.Shift.NumberOfDecimalPlaces); + Assert.IsNaN(inputParameters.SaturatedVolumicWeightOfCoverageLayer.Shift); + + DistributionAssert.AreEqual(thicknessAquiferLayer, inputParameters.ThicknessAquiferLayer); + DistributionAssert.AreEqual(seepageLength, inputParameters.SeepageLength); + + Assert.IsNaN(inputParameters.ExitPointL); + Assert.AreEqual(2, inputParameters.ExitPointL.NumberOfDecimalPlaces); + Assert.IsNaN(inputParameters.EntryPointL); + Assert.AreEqual(2, inputParameters.EntryPointL.NumberOfDecimalPlaces); + Assert.IsNaN(inputParameters.PiezometricHeadExit); + Assert.AreEqual(2, inputParameters.PiezometricHeadExit.NumberOfDecimalPlaces); + + Assert.IsInstanceOf(inputParameters.AssessmentLevel); + Assert.AreEqual(2, inputParameters.AssessmentLevel.NumberOfDecimalPlaces); + Assert.IsNaN(inputParameters.AssessmentLevel); + + Assert.IsFalse(inputParameters.UseAssessmentLevelManualInput); + } + + [Test] + public void Constructor_GeneralPipingInputIsNull_ArgumentNullException() + { + // Call + TestDelegate call = () => new MacroStabilityInwardsInput(null); + + // Assert + Assert.Throws(call); + } + + [Test] + [TestCase(1.23456)] + [TestCase(3.5)] + public void ExitPointL_ExitPointEqualSmallerThanEntryPoint_ThrowsArgumentOutOfRangeException(double value) + { + // Setup + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) + { + EntryPointL = (RoundedDouble) 3.5 + }; + + // Call + TestDelegate call = () => pipingInput.ExitPointL = (RoundedDouble) value; + + // Assert + const string expectedMessage = "Het uittredepunt moet landwaarts van het intredepunt liggen."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage); + } + + [Test] + public void ExitPointL_Always_SameNumberOfDecimalsAsSurfaceLineLocalGeometry() + { + // Setup + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) + { + SurfaceLine = CreateSurfaceLine() + }; + + // Call + RoundedPoint2DCollection localGeometry = pipingInput.SurfaceLine.ProjectGeometryToLZ(); + + // Assert + Assert.AreEqual(localGeometry.NumberOfDecimalPlaces, pipingInput.ExitPointL.NumberOfDecimalPlaces); + } + + [Test] + [SetCulture("nl-NL")] + [TestCase(5.4)] + [TestCase(1.006)] + [TestCase(-0.005)] + [TestCase(-5.4)] + public void ExitPointL_ExitPointNotOnSurfaceLine_ThrowsArgumentOutOfRangeException(double value) + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.EntryPointL = RoundedDouble.NaN; + + // Call + TestDelegate call = () => input.ExitPointL = (RoundedDouble) value; + + // Assert + const string expectedMessage = "Het gespecificeerde punt moet op het profiel liggen (bereik [0,0, 1,0])."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage); + } + + [Test] + [TestCase(double.NaN)] + [TestCase(-1e-3, Description = "Valid ExitPointL due to rounding to 0.0")] + [TestCase(0.1004)] + [TestCase(0.50)] + public void ExitPointL_SetToNew_ValueIsRounded(double exitPointValue) + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.EntryPointL = RoundedDouble.NaN; + + int originalNumberOfDecimalPlaces = input.ExitPointL.NumberOfDecimalPlaces; + + // Call + input.ExitPointL = (RoundedDouble) exitPointValue; + + // Assert + Assert.AreEqual(originalNumberOfDecimalPlaces, input.ExitPointL.NumberOfDecimalPlaces); + Assert.AreEqual(new RoundedDouble(originalNumberOfDecimalPlaces, exitPointValue), input.ExitPointL); + } + + [Test] + [TestCase(5.0)] + [TestCase(3.5)] + public void EntryPointL_EntryPointEqualOrGreaterThanExitPoint_ThrowsArgumentOutOfRangeException(double value) + { + // Setup + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) + { + ExitPointL = (RoundedDouble) 3.5 + }; + + // Call + TestDelegate call = () => pipingInput.EntryPointL = (RoundedDouble) value; + + // Assert + const string expectedMessage = "Het uittredepunt moet landwaarts van het intredepunt liggen."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage); + } + + [Test] + [SetCulture("nl-NL")] + [TestCase(5.4)] + [TestCase(1.006)] + [TestCase(-0.005)] + [TestCase(-5.4)] + public void EntryPointL_EntryPointNotOnSurfaceLine_ThrowsArgumentOutOfRangeException(double value) + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.ExitPointL = RoundedDouble.NaN; + // Call + TestDelegate call = () => input.EntryPointL = (RoundedDouble) value; + + // Assert + const string expectedMessage = "Het gespecificeerde punt moet op het profiel liggen (bereik [0,0, 1,0])."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage); + } + + [Test] + [TestCase(double.NaN)] + [TestCase(-1e-3, Description = "Valid EntryPointL due to rounding to 0.0")] + [TestCase(0.005)] + [TestCase(0.1004)] + [TestCase(0.50)] + public void EntryPointL_SetToNew_ValueIsRounded(double entryPointValue) + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.ExitPointL = RoundedDouble.NaN; + + int originalNumberOfDecimalPlaces = input.EntryPointL.NumberOfDecimalPlaces; + + // Call + input.EntryPointL = (RoundedDouble) entryPointValue; + + // Assert + Assert.AreEqual(originalNumberOfDecimalPlaces, input.EntryPointL.NumberOfDecimalPlaces); + Assert.AreEqual(new RoundedDouble(originalNumberOfDecimalPlaces, entryPointValue), input.EntryPointL); + } + + [Test] + public void EntryPointL_Always_SameNumberOfDecimalsAsSurfaceLineLocalGeometry() + { + // Setup + RingtoetsPipingSurfaceLine surfaceLine = CreateSurfaceLine(); + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()); + + // Call + RoundedPoint2DCollection localGeometry = surfaceLine.ProjectGeometryToLZ(); + + // Assert + Assert.AreEqual(localGeometry.NumberOfDecimalPlaces, pipingInput.EntryPointL.NumberOfDecimalPlaces); + } + + [Test] + public void SurfaceLine_WithDikeToes_ExitPointLAndEntryPointLUpdated() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); + + var surfaceLine = new RingtoetsPipingSurfaceLine(); + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, 0), + new Point3D(1, 0, 2), + new Point3D(2, 0, 3) + }); + surfaceLine.SetDikeToeAtRiverAt(new Point3D(1, 0, 2)); + surfaceLine.SetDikeToeAtPolderAt(new Point3D(2, 0, 3)); + + // Call + input.SurfaceLine = surfaceLine; + + // Assert + Assert.AreEqual(new RoundedDouble(2, 1), input.EntryPointL); + Assert.AreEqual(new RoundedDouble(2, 2), input.ExitPointL); + } + + [Test] + public void SurfaceLine_DikeToesBeyondSetExitPointL_ExitPointLAndEntryPointLUpdated() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); + + var surfaceLine = new RingtoetsPipingSurfaceLine(); + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, 0), + new Point3D(1, 0, 2), + new Point3D(2, 0, 3), + new Point3D(3, 0, 0), + new Point3D(4, 0, 2), + new Point3D(5, 0, 3) + }); + surfaceLine.SetDikeToeAtRiverAt(new Point3D(2, 0, 3)); + surfaceLine.SetDikeToeAtPolderAt(new Point3D(3, 0, 0)); + + input.SurfaceLine = surfaceLine; + input.EntryPointL = (RoundedDouble) 0; + input.ExitPointL = (RoundedDouble) 1; + + // Call + input.SurfaceLine = surfaceLine; + + // Assert + Assert.AreEqual(new RoundedDouble(2, 2), input.EntryPointL); + Assert.AreEqual(new RoundedDouble(3, 3), input.ExitPointL); + } + + [Test] + public void SurfaceLine_DikeToesBeforeSetEntryPointL_ExitPointLAndEntryPointLUpdated() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); + + var surfaceLine = new RingtoetsPipingSurfaceLine(); + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, 0), + new Point3D(1, 0, 2), + new Point3D(2, 0, 3), + new Point3D(3, 0, 0), + new Point3D(4, 0, 2), + new Point3D(5, 0, 3) + }); + surfaceLine.SetDikeToeAtRiverAt(new Point3D(2, 0, 3)); + surfaceLine.SetDikeToeAtPolderAt(new Point3D(3, 0, 0)); + + input.SurfaceLine = surfaceLine; + input.ExitPointL = (RoundedDouble) 5; + input.EntryPointL = (RoundedDouble) 4; + + // Call + input.SurfaceLine = surfaceLine; + + // Assert + Assert.AreEqual(new RoundedDouble(2, 2), input.EntryPointL); + Assert.AreEqual(new RoundedDouble(2, 3), input.ExitPointL); + } + + [Test] + public void SynchronizeEntryAndExitPointInput_SurfaceLineNull_EntryPointLAndExitPointLNaN() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) + { + EntryPointL = (RoundedDouble) 3, + ExitPointL = (RoundedDouble) 5 + }; + + // Precondition + Assert.AreEqual(3, input.EntryPointL.Value); + Assert.AreEqual(5, input.ExitPointL.Value); + + // Call + input.SynchronizeEntryAndExitPointInput(); + + // Assert + Assert.IsNaN(input.EntryPointL); + Assert.IsNaN(input.ExitPointL); + } + + [Test] + public void SynchronizeEntryAndExitPointInput_DikeToesBeyondSetExitPointL_ExitPointLAndEntryPointLUpdated() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); + + var surfaceLine = new RingtoetsPipingSurfaceLine(); + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, 0), + new Point3D(1, 0, 2), + new Point3D(2, 0, 3), + new Point3D(3, 0, 0), + new Point3D(4, 0, 2), + new Point3D(5, 0, 3) + }); + surfaceLine.SetDikeToeAtRiverAt(new Point3D(2, 0, 3)); + surfaceLine.SetDikeToeAtPolderAt(new Point3D(3, 0, 0)); + + input.SurfaceLine = surfaceLine; + input.EntryPointL = (RoundedDouble) 0; + input.ExitPointL = (RoundedDouble) 1; + + // Call + input.SynchronizeEntryAndExitPointInput(); + + // Assert + Assert.AreEqual(new RoundedDouble(2, 2), input.EntryPointL); + Assert.AreEqual(new RoundedDouble(3, 3), input.ExitPointL); + } + + [Test] + public void SynchronizeEntryAndExitPointInput_DikeToesBeforeSetEntryPointL_ExitPointLAndEntryPointLUpdated() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); + + var surfaceLine = new RingtoetsPipingSurfaceLine(); + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, 0), + new Point3D(1, 0, 2), + new Point3D(2, 0, 3), + new Point3D(3, 0, 0), + new Point3D(4, 0, 2), + new Point3D(5, 0, 3) + }); + surfaceLine.SetDikeToeAtRiverAt(new Point3D(2, 0, 3)); + surfaceLine.SetDikeToeAtPolderAt(new Point3D(3, 0, 0)); + + input.SurfaceLine = surfaceLine; + input.ExitPointL = (RoundedDouble) 5; + input.EntryPointL = (RoundedDouble) 4; + + // Call + input.SynchronizeEntryAndExitPointInput(); + + // Assert + Assert.AreEqual(new RoundedDouble(2, 2), input.EntryPointL); + Assert.AreEqual(new RoundedDouble(2, 3), input.ExitPointL); + } + + [Test] + public void IsEntryAndExitPointInputSynchronized_SurfaceLineNull_ReturnFalse() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); + + // Call + bool synchronized = input.IsEntryAndExitPointInputSynchronized; + + // Assert + Assert.IsFalse(synchronized); + } + + [Test] + public void IsEntryAndExitPointInputSynchronized_SurfaceLineAndInputInSync_ReturnTrue() + { + // Setup + var surfaceLine = new RingtoetsPipingSurfaceLine(); + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, 0), + new Point3D(1, 0, 2), + new Point3D(2, 0, 3), + new Point3D(3, 0, 0), + new Point3D(4, 0, 2), + new Point3D(5, 0, 3) + }); + surfaceLine.SetDikeToeAtRiverAt(new Point3D(2, 0, 3)); + surfaceLine.SetDikeToeAtPolderAt(new Point3D(3, 0, 0)); + + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) + { + SurfaceLine = surfaceLine + }; + + // Call + bool synchronized = input.IsEntryAndExitPointInputSynchronized; + + // Assert + Assert.IsTrue(synchronized); + } + + [Test] + [TestCaseSource(nameof(DifferentSurfaceLineProperties))] + public void IsEntryAndExitPointInputSynchronized_SurfaceLineAndInputNotInSync_ReturnFalse(Point3D newDikeToeAtRiver, Point3D newDikeToeAtPolder) + { + // Setup + var surfaceLine = new RingtoetsPipingSurfaceLine(); + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, 0), + new Point3D(1, 0, 2), + new Point3D(2, 0, 3), + new Point3D(3, 0, 0), + new Point3D(4, 0, 2), + new Point3D(5, 0, 3) + }); + surfaceLine.SetDikeToeAtRiverAt(new Point3D(2, 0, 3)); + surfaceLine.SetDikeToeAtPolderAt(new Point3D(3, 0, 0)); + + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) + { + SurfaceLine = surfaceLine + }; + + input.SurfaceLine.SetDikeToeAtRiverAt(newDikeToeAtRiver); + input.SurfaceLine.SetDikeToeAtPolderAt(newDikeToeAtPolder); + + // Call + bool synchronized = input.IsEntryAndExitPointInputSynchronized; + + // Assert + Assert.IsFalse(synchronized); + } + + private static IEnumerable DifferentSurfaceLineProperties + { + get + { + yield return new TestCaseData(new Point3D(3, 0, 0), new Point3D(3, 0, 0)) + .SetName("DifferentDikeToeAtRiver"); + yield return new TestCaseData(new Point3D(2, 0, 3), new Point3D(4, 0, 2)) + .SetName("DifferentDikeToeAtPolder"); + } + } + + [Test] + public void GivenSurfaceLineSet_WhenSurfaceLineNull_ThenEntryAndExitPointsNaN() + { + // Given + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); + + var surfaceLine = new RingtoetsPipingSurfaceLine(); + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, 0), + new Point3D(1, 0, 2), + new Point3D(2, 0, 3), + new Point3D(3, 0, 0), + new Point3D(4, 0, 2), + new Point3D(5, 0, 3) + }); + input.SurfaceLine = surfaceLine; + input.ExitPointL = (RoundedDouble) 5; + input.EntryPointL = (RoundedDouble) 4; + + // When + input.SurfaceLine = null; + + // Then + Assert.IsNaN(input.EntryPointL); + Assert.IsNaN(input.ExitPointL); + } + + [Test] + public void PhreaticLevelExit_SetNewValue_UpdateMeanAndStandardDeviation() + { + // Setup + var random = new Random(22); + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); + var mean = (RoundedDouble) (0.01 + random.NextDouble()); + var standardDeviation = (RoundedDouble) (0.01 + random.NextDouble()); + var expectedDistribution = new NormalDistribution(3) + { + Mean = mean, + StandardDeviation = standardDeviation + }; + var distributionToSet = new NormalDistribution(5) + { + Mean = mean, + StandardDeviation = standardDeviation + }; + + // Call + input.PhreaticLevelExit = distributionToSet; + + // Assert + AssertDistributionCorrectlySet(input.PhreaticLevelExit, distributionToSet, expectedDistribution); + } + + [Test] + public void DampingFactorExit_SetNewValue_UpdateMeanAndStandardDeviation() + { + // Setup + var random = new Random(22); + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); + var mean = (RoundedDouble) (0.01 + random.NextDouble()); + var standardDeviation = (RoundedDouble) (0.01 + random.NextDouble()); + var expectedDistribution = new LogNormalDistribution(3) + { + Mean = mean, + StandardDeviation = standardDeviation + }; + var distributionToSet = new LogNormalDistribution(5) + { + Mean = mean, + StandardDeviation = standardDeviation + }; + + // Call + input.DampingFactorExit = distributionToSet; + + // Assert + AssertDistributionCorrectlySet(input.DampingFactorExit, distributionToSet, expectedDistribution); + } + + [Test] + public void AssessmentLevel_UseAssessmentLevelManualInputIsFalse_ReturnsNaN() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) + { + UseAssessmentLevelManualInput = false, + HydraulicBoundaryLocation = new TestHydraulicBoundaryLocation() + }; + + // Call + RoundedDouble calculatedAssessmentLevel = input.AssessmentLevel; + + // Assert + Assert.IsNaN(calculatedAssessmentLevel); + } + + [Test] + public void AssessmentLevel_UseAssessmentLevelManualInputIsFalseWithHydraulicLocationSetAndDesignWaterLevelOutputSet_ReturnCalculatedAssessmentLevel() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); + + HydraulicBoundaryLocation testHydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(); + input.HydraulicBoundaryLocation = testHydraulicBoundaryLocation; + + double calculatedAssessmentLevel = new Random(21).NextDouble(); + testHydraulicBoundaryLocation.DesignWaterLevelOutput = new TestHydraulicBoundaryLocationOutput(calculatedAssessmentLevel); + + // Call + RoundedDouble newAssessmentLevel = input.AssessmentLevel; + + // Assert + Assert.AreEqual(calculatedAssessmentLevel, newAssessmentLevel, input.AssessmentLevel.GetAccuracy()); + } + + [Test] + public void AssessmentLevel_UseAssessmentLevelManualInputFalseAndSettingValue_ThrowsInvalidOperationException() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) + { + UseAssessmentLevelManualInput = false + }; + + var testLevel = (RoundedDouble) new Random(21).NextDouble(); + + // Call + TestDelegate call = () => input.AssessmentLevel = testLevel; + + // Assert + string message = Assert.Throws(call).Message; + Assert.AreEqual("UseAssessmentLevelManualInput is false", message); + } + + [Test] + public void AssessmentLevel_UseAssessmentLevelManualInputTrueAndSettingValue_ReturnSetValue() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) + { + UseAssessmentLevelManualInput = true + }; + + var testLevel = (RoundedDouble) new Random(21).NextDouble(); + + // Call + input.AssessmentLevel = testLevel; + + // Assert + Assert.AreEqual(2, input.AssessmentLevel.NumberOfDecimalPlaces); + Assert.AreEqual(testLevel, input.AssessmentLevel, input.AssessmentLevel.GetAccuracy()); + } + + [Test] + public void GivenAssessmentLevelSetByHydraulicBoundaryLocation_WhenManualAssessmentLevelTrueAndNewLevelSet_ThenLevelUpdatedAndLocationRemoved() + { + // Given + var random = new Random(21); + var testLevel = (RoundedDouble) random.NextDouble(); + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) + { + HydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(testLevel) + }; + + var newLevel = (RoundedDouble) random.NextDouble(); + + // When + input.UseAssessmentLevelManualInput = true; + input.AssessmentLevel = newLevel; + + // Then + Assert.AreEqual(2, input.AssessmentLevel.NumberOfDecimalPlaces); + Assert.AreEqual(newLevel, input.AssessmentLevel, input.AssessmentLevel.GetAccuracy()); + Assert.IsNull(input.HydraulicBoundaryLocation); + } + + [Test] + public void GivenAssessmentLevelSetByManualInput_WhenManualAssessmentLevelFalseAndHydraulicBoundaryLocationSet_ThenAssessmentLevelUpdatedAndLocationSet() + { + // Given + var random = new Random(21); + var testLevel = (RoundedDouble) random.NextDouble(); + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) + { + UseAssessmentLevelManualInput = true, + AssessmentLevel = testLevel + }; + + var newLevel = (RoundedDouble) random.NextDouble(); + TestHydraulicBoundaryLocation hydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(newLevel); + + // When + input.UseAssessmentLevelManualInput = false; + input.HydraulicBoundaryLocation = hydraulicBoundaryLocation; + + // Then + Assert.AreEqual(2, input.AssessmentLevel.NumberOfDecimalPlaces); + Assert.AreSame(hydraulicBoundaryLocation, input.HydraulicBoundaryLocation); + Assert.AreEqual(newLevel, input.AssessmentLevel, input.AssessmentLevel.GetAccuracy()); + } + + [Test] + public void PiezometricHeadExit_ValidInput_SetsParametersForCalculatorAndReturnsPiezometricHead() + { + // Setup + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()); + + using (new PipingSubCalculatorFactoryConfig()) + { + // Call + RoundedDouble piezometricHead = input.PiezometricHeadExit; + + // Assert + Assert.AreEqual(2, piezometricHead.NumberOfDecimalPlaces); + Assert.IsFalse(double.IsNaN(piezometricHead)); + + var factory = (TestPipingSubCalculatorFactory) PipingSubCalculatorFactory.Instance; + PiezoHeadCalculatorStub piezometricHeadAtExitCalculator = factory.LastCreatedPiezometricHeadAtExitCalculator; + + Assert.AreEqual(piezometricHeadAtExitCalculator.HRiver, input.AssessmentLevel, input.AssessmentLevel.GetAccuracy()); + Assert.AreEqual(PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(input).GetDesignValue(), piezometricHeadAtExitCalculator.PhiPolder, + input.PhreaticLevelExit.GetAccuracy()); + Assert.AreEqual(PipingSemiProbabilisticDesignValueFactory.GetDampingFactorExit(input).GetDesignValue(), piezometricHeadAtExitCalculator.RExit, + input.DampingFactorExit.GetAccuracy()); + } + } + + [Test] + public void PiezometricHeadExit_InputWithAssessmentLevelMissing_PiezometricHeadSetToNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(1.0, 1.0); + + // Call + RoundedDouble piezometricHead = input.PiezometricHeadExit; + + // Assert + Assert.IsNaN(piezometricHead); + } + + [Test] + public void ThicknessAquiferLayer_SoilProfileSingleAquiferAndCoverageUnderSurfaceLine_ReturnsThicknessAquiferLayer() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.AreEqual(1.0, thicknessAquiferLayer.Mean); + } + + [Test] + public void ThicknessAquiferLayer_InputWithoutSoilProfile_MeansSetToNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.StochasticSoilProfile = null; + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.IsNaN(thicknessAquiferLayer.Mean); + } + + [Test] + public void ThicknessAquiferLayer_InputWithoutSurfaceLine_MeansSetToNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.SurfaceLine = null; + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.IsNaN(thicknessAquiferLayer.Mean); + } + + [Test] + [TestCase(1e-6)] + [TestCase(1)] + public void ThicknessAquiferLayer_SoilProfileSingleAquiferAboveSurfaceLine_ThicknessCoverageLayerNaN(double deltaAboveSurfaceLine) + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.IsNaN(thicknessAquiferLayer.Mean); + } + + [Test] + public void ThicknessAquiferLayer_SoilProfileMultipleAquiferUnderSurfaceLine_AquiferMeanSetToConsecutiveAquiferLayerThickness() + { + // Setup + double expectedThickness; + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedThickness); + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.AreEqual(expectedThickness, thicknessAquiferLayer.Mean); + } + + [Test] + public void ThicknessAquiferLayer_MeanSetExitPointSetToNaN_ThicknessAquiferLayerNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.ExitPointL = RoundedDouble.NaN; + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.IsNaN(thicknessAquiferLayer.Mean); + } + + [Test] + public void ThicknessAquiferLayer_ProfileWithoutAquiferLayer_ThicknessAquiferLayerNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) + { + SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] + { + new PipingSoilLayer(2.0) + { + IsAquifer = false + } + }, SoilProfileType.SoilProfile1D, 0) + }; + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.IsNaN(thicknessAquiferLayer.Mean); + } + + [Test] + public void ThicknessAquiferLayer_SoilProfileSingleAquiferUnderSurfaceLine_ThicknessAquiferLayerMeanSet() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquifer(); + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.AreEqual(1.0, thicknessAquiferLayer.Mean); + } + + [Test] + public void ThicknessAquiferLayer_SoilProfileMultipleAquiferUnderSurfaceLine_MeanSetToConsecutiveAquiferLayerThickness() + { + // Setup + double expectedThickness; + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedThickness); + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.AreEqual(expectedThickness, thicknessAquiferLayer.Mean); + } + + [Test] + public void ThicknessAquiferLayer_MeanSetSoilProfileSetToNull_ThicknessAquiferLayerNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + + input.StochasticSoilProfile = null; + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.IsNaN(thicknessAquiferLayer.Mean); + } + + [Test] + public void ThicknessAquiferLayer_InputResultsInZeroAquiferThickness_ThicknessAquiferLayerNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) + { + SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] + { + new PipingSoilLayer(2.0) + { + IsAquifer = false + }, + new PipingSoilLayer(0.0) + { + IsAquifer = true + } + }, SoilProfileType.SoilProfile1D, 0) + }; + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.IsNaN(thicknessAquiferLayer.Mean); + } + + [Test] + public void ThicknessAquiferLayer_SurfaceLineHalfWayProfileLayer_ThicknessSetToLayerHeightUnderSurfaceLine() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) + { + SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] + { + new PipingSoilLayer(2.5) + { + IsAquifer = true + }, + new PipingSoilLayer(1.5) + { + IsAquifer = true + } + }, SoilProfileType.SoilProfile1D, 0) + }; + + // Call + LogNormalDistribution thicknessAquiferLayer = input.ThicknessAquiferLayer; + + // Assert + Assert.AreEqual(2.0, thicknessAquiferLayer.Mean); + } + + [Test] + public void ThicknessCoverageLayer_InputWithoutSoilProfile_MeansSetToNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.StochasticSoilProfile = null; + + // Call + LogNormalDistribution thicknessCoverageLayer = input.ThicknessCoverageLayer; + + // Assert + Assert.IsNaN(thicknessCoverageLayer.Mean); + } + + [Test] + public void ThicknessCoverageLayer_InputWithoutSurfaceLine_MeansSetToNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.SurfaceLine = null; + + // Call + LogNormalDistribution thicknessCoverageLayer = input.ThicknessCoverageLayer; + + // Assert + Assert.IsNaN(thicknessCoverageLayer.Mean); + } + + [Test] + [TestCase(1e-6)] + [TestCase(1)] + public void ThicknessCoverageLayer_SoilProfileSingleAquiferAboveSurfaceLine_ThicknessCoverageLayerNaN(double deltaAboveSurfaceLine) + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); + + // Call + LogNormalDistribution thicknessCoverageLayer = input.ThicknessCoverageLayer; + + // Assert + Assert.IsNaN(thicknessCoverageLayer.Mean); + } + + [Test] + public void ThicknessCoverageLayer_MeanSetSoilProfileSetToNull_ThicknessCoverageLayerNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.ThicknessCoverageLayer.Mean = new RoundedDouble(2, new Random(21).NextDouble() + 1); + + input.StochasticSoilProfile = null; + + // Call + LogNormalDistribution thicknessCoverageLayer = input.ThicknessCoverageLayer; + + // Assert + Assert.IsNaN(thicknessCoverageLayer.Mean); + } + + [Test] + public void ThicknessCoverageLayer_ProfileWithoutAquiferLayer_ThicknessCoverageLayerNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) + { + SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] + { + new PipingSoilLayer(2.0) + { + IsAquifer = false + } + }, SoilProfileType.SoilProfile1D, 0) + }; + + // Call + LogNormalDistribution thicknessCoverageLayer = input.ThicknessCoverageLayer; + + // Assert + Assert.IsNaN(thicknessCoverageLayer.Mean); + } + + [Test] + public void ThicknessCoverageLayer_InputResultsInZeroCoverageThickness_ThicknessCoverageLayerNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) + { + SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] + { + new PipingSoilLayer(2.0) + { + IsAquifer = false + }, + new PipingSoilLayer(2.0) + { + IsAquifer = true + } + }, SoilProfileType.SoilProfile1D, 0) + }; + + // Call + LogNormalDistribution thicknessCoverageLayer = input.ThicknessCoverageLayer; + + // Assert + Assert.IsNaN(thicknessCoverageLayer.Mean); + } + + [Test] + public void EffectiveThicknessCoverageLayer_InputWithoutSoilProfile_MeansSetToNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.StochasticSoilProfile = null; + + // Call + LogNormalDistribution effectiveThicknessCoverageLayer = input.EffectiveThicknessCoverageLayer; + + // Assert + Assert.IsNaN(effectiveThicknessCoverageLayer.Mean); + } + + [Test] + public void EffectiveThicknessCoverageLayer_InputWithoutSurfaceLine_MeansSetToNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.SurfaceLine = null; + + // Call + LogNormalDistribution effectiveThicknessCoverageLayer = input.EffectiveThicknessCoverageLayer; + + // Assert + Assert.IsNaN(effectiveThicknessCoverageLayer.Mean); + } + + [Test] + [TestCase(1e-6)] + [TestCase(1)] + public void EffectiveThicknessCoverageLayer_SoilProfileSingleAquiferAboveSurfaceLine_EffectiveThicknessCoverageLayerNaN(double deltaAboveSurfaceLine) + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); + + // Call + LogNormalDistribution effectiveThicknessCoverageLayer = input.EffectiveThicknessCoverageLayer; + + // Assert + Assert.IsNaN(effectiveThicknessCoverageLayer.Mean); + } + + [Test] + public void EffectiveThicknessCoverageLayer_MeanSetSoilProfileSetToNull_EffectiveThicknessCoverageLayerNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.EffectiveThicknessCoverageLayer.Mean = new RoundedDouble(2, new Random(21).NextDouble() + 1); + + input.StochasticSoilProfile = null; + + // Call + LogNormalDistribution effectiveThicknessCoverageLayer = input.EffectiveThicknessCoverageLayer; + + // Assert + Assert.IsNaN(effectiveThicknessCoverageLayer.Mean); + } + + [Test] + public void EffectiveThicknessCoverageLayer_ProfileWithoutAquiferLayer_EffectiveThicknessCoverageLayerNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) + { + SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] + { + new PipingSoilLayer(2.0) + { + IsAquifer = false + } + }, SoilProfileType.SoilProfile1D, 0) + }; + + // Call + LogNormalDistribution effectiveThicknessCoverageLayer = input.EffectiveThicknessCoverageLayer; + + // Assert + Assert.IsNaN(effectiveThicknessCoverageLayer.Mean); + } + + [Test] + public void EffectiveThicknessCoverageLayer_InputResultsInZeroCoverageThickness_EffectiveThicknessCoverageLayerNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.StochasticSoilProfile = new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 0) + { + SoilProfile = new PipingSoilProfile(string.Empty, 0, new[] + { + new PipingSoilLayer(2.0) + { + IsAquifer = false + }, + new PipingSoilLayer(2.0) + { + IsAquifer = true + } + }, SoilProfileType.SoilProfile1D, 0) + }; + + // Call + LogNormalDistribution effectiveThicknessCoverageLayer = input.EffectiveThicknessCoverageLayer; + + // Assert + Assert.IsNaN(effectiveThicknessCoverageLayer.Mean); + } + + [Test] + public void SeepageLength_ValidData_ReturnsSeepageLength() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + + // Call + VariationCoefficientLogNormalDistribution seepageLength = input.SeepageLength; + + // Assert + Assert.AreEqual(0.5, seepageLength.Mean); + Assert.AreEqual(0.1, seepageLength.CoefficientOfVariation); + } + + [Test] + public void SeepageLength_EntryPointNaN_SeepageLengthNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.EntryPointL = RoundedDouble.NaN; + + // Call + VariationCoefficientLogNormalDistribution seepageLength = input.SeepageLength; + + // Assert + Assert.IsNaN(seepageLength.Mean); + Assert.AreEqual(0.1, seepageLength.CoefficientOfVariation); + } + + [Test] + public void SeepageLength_ExitPointNaN_SeepageLengthNaN() + { + // Setup + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + input.ExitPointL = RoundedDouble.NaN; + + // Call + VariationCoefficientLogNormalDistribution seepageLength = input.SeepageLength; + + // Assert + Assert.IsNaN(seepageLength.Mean); + Assert.AreEqual(0.1, seepageLength.CoefficientOfVariation); + } + + private static RingtoetsPipingSurfaceLine CreateSurfaceLine() + { + var surfaceLine = new RingtoetsPipingSurfaceLine(); + surfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, 0), + new Point3D(2, 0, 2) + }); + + return surfaceLine; + } + + private static void AssertDistributionCorrectlySet(IDistribution distributionToAssert, IDistribution setDistribution, IDistribution expectedDistribution) + { + Assert.AreNotSame(setDistribution, distributionToAssert); + DistributionAssert.AreEqual(expectedDistribution, distributionToAssert); + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/PipingCalculationTest.cs =================================================================== diff -u -r4a27dfb1033419dd325dee88fd4abe3cb56e452d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/PipingCalculationTest.cs (.../PipingCalculationTest.cs) (revision 4a27dfb1033419dd325dee88fd4abe3cb56e452d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/PipingCalculationTest.cs (.../PipingCalculationTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -54,7 +54,7 @@ Assert.AreEqual("Nieuwe berekening", calculation.Name); - Assert.IsInstanceOf(calculation.InputParameters); + Assert.IsInstanceOf(calculation.InputParameters); Assert.IsFalse(calculation.HasOutput); Assert.IsNull(calculation.Comments.Body); Fisheye: Tag 0bd99fbcdd44bb84757a0270af6f5085dbd76648 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/PipingInputTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj =================================================================== diff -u -ra4f43954cde9fe753635bc71ab7b44eba5ef46db -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision a4f43954cde9fe753635bc71ab7b44eba5ef46db) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -66,7 +66,7 @@ - + Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/PipingInputFactoryTest.cs =================================================================== diff -u -r4a27dfb1033419dd325dee88fd4abe3cb56e452d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/PipingInputFactoryTest.cs (.../PipingInputFactoryTest.cs) (revision 4a27dfb1033419dd325dee88fd4abe3cb56e452d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/PipingInputFactoryTest.cs (.../PipingInputFactoryTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -33,7 +33,7 @@ public void CreateInputWithAquiferAndCoverageLayer_WithoutInputs_ExpectedValues() { // Call - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); // Assert Assert.AreEqual(0.5, input.ExitPointL); @@ -57,7 +57,7 @@ public void CreateInputWithAquiferAndCoverageLayer_DifferentInputs_ExpectedValues(double thicknessAquiferLayer, double thicknessCoverageLayer) { // Call - PipingInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(thicknessAquiferLayer, thicknessCoverageLayer); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(thicknessAquiferLayer, thicknessCoverageLayer); // Assert Assert.AreEqual(0.5, input.ExitPointL); @@ -79,7 +79,7 @@ public void CreateInputWithAquifer_WithoutInputs_ExpectedValues() { // Call - PipingInput input = PipingInputFactory.CreateInputWithAquifer(); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquifer(); // Assert Assert.AreEqual(0.5, input.ExitPointL); @@ -102,7 +102,7 @@ public void CreateInputWithAquifer_DifferentInputs_ExpectedValues(double thicknessAquiferLayer) { // Call - PipingInput input = PipingInputFactory.CreateInputWithAquifer(thicknessAquiferLayer); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithAquifer(thicknessAquiferLayer); // Assert Assert.AreEqual(0.5, input.ExitPointL); @@ -125,7 +125,7 @@ public void CreateInputWithSingleAquiferLayerAboveSurfaceLine_DifferentInputs_ExpectedValues(double deltaAboveSurfaceLine) { // Call - PipingInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithSingleAquiferLayerAboveSurfaceLine(deltaAboveSurfaceLine); // Assert Assert.AreEqual(0.5, input.ExitPointL); @@ -151,7 +151,7 @@ double expectedAquiferThickness; // Call - PipingInput input = PipingInputFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedAquiferThickness); + MacroStabilityInwardsInput input = PipingInputFactory.CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out expectedAquiferThickness); // Assert Assert.AreEqual(0.5, input.ExitPointL); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/PipingInputFactory.cs =================================================================== diff -u -r4a27dfb1033419dd325dee88fd4abe3cb56e452d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/PipingInputFactory.cs (.../PipingInputFactory.cs) (revision 4a27dfb1033419dd325dee88fd4abe3cb56e452d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/PipingInputFactory.cs (.../PipingInputFactory.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -26,7 +26,7 @@ namespace Ringtoets.MacroStabilityInwards.Data.TestUtil { /// - /// Helper class for creating different instances of + /// Helper class for creating different instances of /// for easier testing. /// public static class PipingInputFactory @@ -36,8 +36,8 @@ /// /// 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) + /// A new . + public static MacroStabilityInwardsInput CreateInputWithAquiferAndCoverageLayer(double thicknessAquiferLayer = 1.0, double thicknessCoverageLayer = 2.0) { var surfaceLine = new RingtoetsPipingSurfaceLine(); surfaceLine.SetGeometry(new[] @@ -60,7 +60,7 @@ }, SoilProfileType.SoilProfile1D, 0) }; - return new PipingInput(new GeneralPipingInput()) + return new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, StochasticSoilProfile = stochasticSoilProfile, @@ -72,8 +72,8 @@ /// Creates piping input with an aquifer layer. /// /// The thickness of the aquifer layer. - /// A new . - public static PipingInput CreateInputWithAquifer(double thicknessAquiferLayer = 1.0) + /// A new . + public static MacroStabilityInwardsInput CreateInputWithAquifer(double thicknessAquiferLayer = 1.0) { var surfaceLine = new RingtoetsPipingSurfaceLine(); surfaceLine.SetGeometry(new[] @@ -92,7 +92,7 @@ }, SoilProfileType.SoilProfile1D, 0) }; - return new PipingInput(new GeneralPipingInput()) + return new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, StochasticSoilProfile = stochasticSoilProfile, @@ -104,8 +104,8 @@ /// 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) + /// A new . + public static MacroStabilityInwardsInput CreateInputWithSingleAquiferLayerAboveSurfaceLine(double deltaAboveSurfaceLine) { var surfaceLine = new RingtoetsPipingSurfaceLine(); const double surfaceLineTopLevel = 2.0; @@ -132,7 +132,7 @@ } }, SoilProfileType.SoilProfile1D, 0) }; - var input = new PipingInput(new GeneralPipingInput()) + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, StochasticSoilProfile = stochasticSoilProfile, @@ -145,8 +145,8 @@ /// 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) + /// A new . + public static MacroStabilityInwardsInput CreateInputWithMultipleAquiferLayersUnderSurfaceLine(out double expectedThickness) { var surfaceLine = new RingtoetsPipingSurfaceLine(); surfaceLine.SetGeometry(new[] @@ -172,7 +172,7 @@ } }, SoilProfileType.SoilProfile1D, 0) }; - var input = new PipingInput(new GeneralPipingInput()) + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, StochasticSoilProfile = stochasticSoilProfile, Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/PipingChartDataPointsFactoryTest.cs =================================================================== diff -u -r4a27dfb1033419dd325dee88fd4abe3cb56e452d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/PipingChartDataPointsFactoryTest.cs (.../PipingChartDataPointsFactoryTest.cs) (revision 4a27dfb1033419dd325dee88fd4abe3cb56e452d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/PipingChartDataPointsFactoryTest.cs (.../PipingChartDataPointsFactoryTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -70,7 +70,7 @@ public void CreateEntryPointPoint_SurfaceLineNull_ReturnsEmptyPointsArray() { // Setup - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = null, EntryPointL = (RoundedDouble) 10.0 @@ -87,7 +87,7 @@ public void CreateEntryPointPoint_EntryPointNaN_ReturnsEmptyPointsArray() { // Setup - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = GetSurfaceLineWithGeometry(), EntryPointL = RoundedDouble.NaN @@ -104,7 +104,7 @@ public void CreateEntryPointPoint_GivenPipingInput_ReturnsEntryPointPointsArray() { // Setup - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = GetSurfaceLineWithGeometry() }; @@ -134,7 +134,7 @@ public void CreateExitPointPoint_SurfaceLineNull_ReturnsEmptyPointsArray() { // Setup - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = null, ExitPointL = (RoundedDouble) 10.0 @@ -151,7 +151,7 @@ public void CreateExitPointPoint_ExitPointNaN_ReturnsEmptyPointsArray() { // Setup - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = GetSurfaceLineWithGeometry(), ExitPointL = RoundedDouble.NaN @@ -168,7 +168,7 @@ public void CreateExitPointPoint_GivenPipingInput_ReturnsExitPointPointsArray() { // Setup - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = GetSurfaceLineWithGeometry() }; Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PipingCalculationConfigurationHelperTest.cs =================================================================== diff -u -r4a27dfb1033419dd325dee88fd4abe3cb56e452d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PipingCalculationConfigurationHelperTest.cs (.../PipingCalculationConfigurationHelperTest.cs) (revision 4a27dfb1033419dd325dee88fd4abe3cb56e452d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PipingCalculationConfigurationHelperTest.cs (.../PipingCalculationConfigurationHelperTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -508,14 +508,14 @@ var pipingCalculationScenario1 = (PipingCalculationScenario) calculationGroup.Children[0]; Assert.AreEqual((RoundedDouble) soilProfile1.Probability, pipingCalculationScenario1.Contribution); - PipingInput calculationInput1 = pipingCalculationScenario1.InputParameters; + MacroStabilityInwardsInput calculationInput1 = pipingCalculationScenario1.InputParameters; Assert.AreSame(soilProfile1, calculationInput1.StochasticSoilProfile); Assert.AreSame(surfaceLine, calculationInput1.SurfaceLine); var pipingCalculationScenario2 = (PipingCalculationScenario) calculationGroup.Children[1]; Assert.AreEqual((RoundedDouble) soilProfile2.Probability, pipingCalculationScenario2.Contribution); - PipingInput calculationInput2 = pipingCalculationScenario2.InputParameters; + MacroStabilityInwardsInput calculationInput2 = pipingCalculationScenario2.InputParameters; Assert.AreSame(soilProfile2, calculationInput2.StochasticSoilProfile); Assert.AreSame(surfaceLine, calculationInput2.SurfaceLine); } @@ -729,14 +729,14 @@ var pipingCalculationScenario1 = (PipingCalculationScenario) calculationGroup.Children[0]; Assert.AreEqual((RoundedDouble) soilProfile1.Probability, pipingCalculationScenario1.Contribution); - PipingInput calculationInput1 = pipingCalculationScenario1.InputParameters; + MacroStabilityInwardsInput calculationInput1 = pipingCalculationScenario1.InputParameters; Assert.AreSame(soilProfile1, calculationInput1.StochasticSoilProfile); Assert.AreSame(surfaceLine, calculationInput1.SurfaceLine); var pipingCalculationScenario2 = (PipingCalculationScenario) calculationGroup.Children[1]; Assert.AreEqual((RoundedDouble) soilProfile2.Probability, pipingCalculationScenario2.Contribution); - PipingInput calculationInput2 = pipingCalculationScenario2.InputParameters; + MacroStabilityInwardsInput calculationInput2 = pipingCalculationScenario2.InputParameters; Assert.AreSame(soilProfile2, calculationInput2.StochasticSoilProfile); Assert.AreSame(surfaceLine, calculationInput2.SurfaceLine); } @@ -837,14 +837,14 @@ var pipingCalculationScenario1 = (PipingCalculationScenario) calculationGroup1.Children[0]; Assert.AreEqual((RoundedDouble) soilProfile1.Probability, pipingCalculationScenario1.Contribution); - PipingInput calculationInput1 = pipingCalculationScenario1.InputParameters; + MacroStabilityInwardsInput calculationInput1 = pipingCalculationScenario1.InputParameters; Assert.AreSame(soilProfile1, calculationInput1.StochasticSoilProfile); Assert.AreSame(surfaceLine1, calculationInput1.SurfaceLine); var pipingCalculationScenario2 = (PipingCalculationScenario) calculationGroup1.Children[1]; Assert.AreEqual((RoundedDouble) soilProfile2.Probability, pipingCalculationScenario1.Contribution); - PipingInput calculationInput2 = pipingCalculationScenario2.InputParameters; + MacroStabilityInwardsInput calculationInput2 = pipingCalculationScenario2.InputParameters; Assert.AreSame(soilProfile2, calculationInput2.StochasticSoilProfile); Assert.AreSame(surfaceLine1, calculationInput2.SurfaceLine); @@ -857,7 +857,7 @@ var pipingCalculationScenario3 = (PipingCalculationScenario) calculationGroup2.Children[0]; Assert.AreEqual((RoundedDouble) soilProfile2.Probability, pipingCalculationScenario1.Contribution); - PipingInput calculationInput3 = pipingCalculationScenario3.InputParameters; + MacroStabilityInwardsInput calculationInput3 = pipingCalculationScenario3.InputParameters; Assert.AreSame(soilProfile2, calculationInput3.StochasticSoilProfile); Assert.AreSame(surfaceLine2, calculationInput3.SurfaceLine); } @@ -970,11 +970,11 @@ var pipingCalculationScenario1 = (PipingCalculationScenario) calculationGroup1.Children[0]; Assert.AreEqual((RoundedDouble) soilProfile1.Probability, pipingCalculationScenario1.Contribution); - PipingInput calculationInput1 = pipingCalculationScenario1.InputParameters; + MacroStabilityInwardsInput calculationInput1 = pipingCalculationScenario1.InputParameters; Assert.AreSame(soilProfile1, calculationInput1.StochasticSoilProfile); Assert.AreSame(surfaceLine1, calculationInput1.SurfaceLine); - PipingInput calculationInput2 = ((PipingCalculationScenario) calculationGroup1.Children[1]).InputParameters; + MacroStabilityInwardsInput calculationInput2 = ((PipingCalculationScenario) calculationGroup1.Children[1]).InputParameters; Assert.AreSame(soilProfile2, calculationInput2.StochasticSoilProfile); Assert.AreSame(surfaceLine1, calculationInput2.SurfaceLine); } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/PipingInputContextTest.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/PipingInputContextTest.cs (.../PipingInputContextTest.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PresentationObjects/PipingInputContextTest.cs (.../PipingInputContextTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -57,7 +57,7 @@ var context = new PipingInputContext(calculation.InputParameters, calculation, surfaceLines, stochasticSoilModels, failureMechanism, assessmentSectionStub); // Assert - Assert.IsInstanceOf>(context); + Assert.IsInstanceOf>(context); Assert.AreSame(calculation.InputParameters, context.WrappedData); Assert.AreSame(calculation, context.PipingCalculation); Assert.AreSame(failureMechanism, context.FailureMechanism); @@ -75,7 +75,7 @@ var assessmentSectionStub = mocks.Stub(); mocks.ReplayAll(); - var calculationInput = new PipingInput(new GeneralPipingInput()); + var calculationInput = new MacroStabilityInwardsInput(new GeneralPipingInput()); var surfaceLines = new[] { new RingtoetsPipingSurfaceLine() Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -97,7 +97,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); var context = new PipingInputContext(inputParameters, calculationItem, @@ -126,7 +126,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); var context = new PipingInputContext(inputParameters, calculationItem, @@ -156,7 +156,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); // Call var context = new PipingInputContext(inputParameters, @@ -329,7 +329,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); if (withSurfaceLine) { @@ -391,7 +391,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); var context = new PipingInputContext(inputParameters, calculationItem, @@ -471,7 +471,7 @@ HydraulicBoundaryLocation testHydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(0.0); - var inputParameters = new PipingInput(new GeneralPipingInput()) + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()) { HydraulicBoundaryLocation = testHydraulicBoundaryLocation, SurfaceLine = surfaceLine, @@ -546,7 +546,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); var context = new PipingInputContext(inputParameters, calculationItem, @@ -749,7 +749,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - PipingInput inputParameters = calculationItem.InputParameters; + MacroStabilityInwardsInput inputParameters = calculationItem.InputParameters; inputParameters.SurfaceLine = surfaceLine; inputParameters.Attach(inputObserver); @@ -792,7 +792,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - PipingInput inputParameters = calculationItem.InputParameters; + MacroStabilityInwardsInput inputParameters = calculationItem.InputParameters; inputParameters.SurfaceLine = surfaceLine; inputParameters.Attach(inputObserver); @@ -835,7 +835,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()) + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, EntryPointL = (RoundedDouble) 2.0 @@ -882,7 +882,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()) + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, ExitPointL = (RoundedDouble) 2.0 @@ -926,7 +926,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()) + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, ExitPointL = (RoundedDouble) 2.0 @@ -971,7 +971,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()) + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, EntryPointL = (RoundedDouble) 2.0 @@ -1093,7 +1093,7 @@ var failureMechanism = new MacroStabilityInwardsFailureMechanism(); var random = new Random(21); - var inputParameters = new PipingInput(new GeneralPipingInput()) + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()) { HydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(50) }; @@ -1143,7 +1143,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()) + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()) { UseAssessmentLevelManualInput = true }; @@ -1185,7 +1185,7 @@ var failureMechanism = new MacroStabilityInwardsFailureMechanism(); var random = new Random(21); - var inputParameters = new PipingInput(new GeneralPipingInput()) + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()) { UseAssessmentLevelManualInput = true, AssessmentLevel = (RoundedDouble) random.NextDouble() @@ -1236,7 +1236,7 @@ }; var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - PipingInput inputParameters = calculationItem.InputParameters; + MacroStabilityInwardsInput inputParameters = calculationItem.InputParameters; var context = new PipingInputContext(inputParameters, calculationItem, @@ -1285,7 +1285,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()) + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = testSurfaceLine, StochasticSoilModel = stochasticSoilModel, @@ -1336,7 +1336,7 @@ } }; - PipingInput inputParameters = calculationItem.InputParameters; + MacroStabilityInwardsInput inputParameters = calculationItem.InputParameters; var failureMechanism = new MacroStabilityInwardsFailureMechanism(); var context = new PipingInputContext(inputParameters, @@ -1389,7 +1389,7 @@ var stochasticSoilModel2 = new StochasticSoilModel(0, "StochasticSoilModel2Name", "StochasticSoilModelSegment2Name"); stochasticSoilModel1.StochasticSoilProfiles.Add(stochasticSoilProfile2); - var inputParameters = new PipingInput(new GeneralPipingInput()) + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = testSurfaceLine, StochasticSoilModel = stochasticSoilModel1, @@ -1432,7 +1432,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); var context = new PipingInputContext(inputParameters, calculationItem, Enumerable.Empty(), @@ -2042,7 +2042,7 @@ observable.Expect(o => o.NotifyObservers()); mocks.ReplayAll(); - PipingInput inputParameters = calculation.InputParameters; + MacroStabilityInwardsInput inputParameters = calculation.InputParameters; var failureMechanism = new MacroStabilityInwardsFailureMechanism(); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilModelSelectionEditorTest.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilModelSelectionEditorTest.cs (.../PipingInputContextStochasticSoilModelSelectionEditorTest.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilModelSelectionEditorTest.cs (.../PipingInputContextStochasticSoilModelSelectionEditorTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -56,7 +56,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { StochasticSoilModel = new StochasticSoilModel(0, "StochasticSoilModelName", "StochasticSoilModelSegmentName") }; @@ -128,7 +128,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, StochasticSoilModel = stochasticSoilModel, Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilProfileSelectionEditorTest.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilProfileSelectionEditorTest.cs (.../PipingInputContextStochasticSoilProfileSelectionEditorTest.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/PipingInputContextStochasticSoilProfileSelectionEditorTest.cs (.../PipingInputContextStochasticSoilProfileSelectionEditorTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -56,7 +56,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { StochasticSoilProfile = new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2) { @@ -131,7 +131,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, StochasticSoilModel = stochasticSoilModel, Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/PipingInputContextSurfaceLineSelectionEditorTest.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/PipingInputContextSurfaceLineSelectionEditorTest.cs (.../PipingInputContextSurfaceLineSelectionEditorTest.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/UITypeEditors/PipingInputContextSurfaceLineSelectionEditorTest.cs (.../PipingInputContextSurfaceLineSelectionEditorTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -54,7 +54,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = ValidSurfaceLine() }; @@ -109,7 +109,7 @@ var calculationItem = new PipingCalculationScenario(new GeneralPipingInput()); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine }; Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/PipingInputViewTest.cs =================================================================== diff -u -r4a27dfb1033419dd325dee88fd4abe3cb56e452d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/PipingInputViewTest.cs (.../PipingInputViewTest.cs) (revision 4a27dfb1033419dd325dee88fd4abe3cb56e452d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/PipingInputViewTest.cs (.../PipingInputViewTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -840,27 +840,27 @@ Assert.AreEqual(surfaceLine.Name, chartData.Name); } - private static void AssertEntryPointLPointchartData(PipingInput pipingInput, RingtoetsPipingSurfaceLine surfaceLine, ChartData chartData) + private static void AssertEntryPointLPointchartData(MacroStabilityInwardsInput macroStabilityInwardsInput, RingtoetsPipingSurfaceLine surfaceLine, ChartData chartData) { Assert.IsInstanceOf(chartData); var entryPointChartData = (ChartPointData) chartData; Assert.AreEqual(1, entryPointChartData.Points.Length); - var entryPoint = new Point2D(pipingInput.EntryPointL, surfaceLine.GetZAtL(pipingInput.EntryPointL)); + var entryPoint = new Point2D(macroStabilityInwardsInput.EntryPointL, surfaceLine.GetZAtL(macroStabilityInwardsInput.EntryPointL)); CollectionAssert.AreEqual(new[] { entryPoint }, entryPointChartData.Points); Assert.AreEqual("Intredepunt", entryPointChartData.Name); } - private static void AssertExitPointLPointchartData(PipingInput pipingInput, RingtoetsPipingSurfaceLine surfaceLine, ChartData chartData) + private static void AssertExitPointLPointchartData(MacroStabilityInwardsInput macroStabilityInwardsInput, RingtoetsPipingSurfaceLine surfaceLine, ChartData chartData) { Assert.IsInstanceOf(chartData); var exitPointChartData = (ChartPointData) chartData; Assert.AreEqual(1, exitPointChartData.Points.Length); - var exitPoint = new Point2D(pipingInput.ExitPointL, surfaceLine.GetZAtL(pipingInput.ExitPointL)); + var exitPoint = new Point2D(macroStabilityInwardsInput.ExitPointL, surfaceLine.GetZAtL(macroStabilityInwardsInput.ExitPointL)); CollectionAssert.AreEqual(new[] { exitPoint Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.InputParameterCalculation.Test/InputParameterCalculationServiceTest.cs =================================================================== diff -u -r4a27dfb1033419dd325dee88fd4abe3cb56e452d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.InputParameterCalculation.Test/InputParameterCalculationServiceTest.cs (.../InputParameterCalculationServiceTest.cs) (revision 4a27dfb1033419dd325dee88fd4abe3cb56e452d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.InputParameterCalculation.Test/InputParameterCalculationServiceTest.cs (.../InputParameterCalculationServiceTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -58,7 +58,7 @@ }; // Call - PipingInput input = invalidPipingCalculation.InputParameters; + MacroStabilityInwardsInput input = invalidPipingCalculation.InputParameters; double result = InputParameterCalculationService.CalculateEffectiveThicknessCoverageLayer(input.WaterVolumetricWeight, PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(input).GetDesignValue(), input.ExitPointL, @@ -101,7 +101,7 @@ }, SoilProfileType.SoilProfile1D, 0) }; - var input = new PipingInput(new GeneralPipingInput()) + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) { ExitPointL = (RoundedDouble) 10, SurfaceLine = surfaceLine, @@ -146,7 +146,7 @@ }, SoilProfileType.SoilProfile1D, 0) }; - var input = new PipingInput(new GeneralPipingInput()) + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) { ExitPointL = (RoundedDouble) 10, SurfaceLine = surfaceLine, @@ -169,7 +169,7 @@ public static void CalculatePiezometricHeadAtExit_Always_ReturnsResult() { // Setup - var input = new PipingInput(new GeneralPipingInput()) + var input = new MacroStabilityInwardsInput(new GeneralPipingInput()) { HydraulicBoundaryLocation = TestHydraulicBoundaryLocation.CreateDesignWaterLevelCalculated(0) }; @@ -189,12 +189,12 @@ { // Setup PipingCalculation validPipingCalculation = PipingCalculationScenarioFactory.CreatePipingCalculationScenarioWithValidInput(); - PipingInput input = validPipingCalculation.InputParameters; + MacroStabilityInwardsInput input = validPipingCalculation.InputParameters; using (new PipingSubCalculatorFactoryConfig()) { // Call - PipingInput inputParameters = validPipingCalculation.InputParameters; + MacroStabilityInwardsInput inputParameters = validPipingCalculation.InputParameters; InputParameterCalculationService.CalculateEffectiveThicknessCoverageLayer( inputParameters.WaterVolumetricWeight, PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(inputParameters).GetDesignValue(), @@ -221,12 +221,12 @@ { // Setup PipingCalculation validPipingCalculation = PipingCalculationScenarioFactory.CreatePipingCalculationScenarioWithValidInput(); - PipingInput input = validPipingCalculation.InputParameters; + MacroStabilityInwardsInput input = validPipingCalculation.InputParameters; using (new PipingSubCalculatorFactoryConfig()) { // Call - PipingInput input1 = validPipingCalculation.InputParameters; + MacroStabilityInwardsInput input1 = validPipingCalculation.InputParameters; InputParameterCalculationService.CalculatePiezometricHeadAtExit( input1.AssessmentLevel, PipingSemiProbabilisticDesignValueFactory.GetDampingFactorExit(input1).GetDesignValue(), Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/PipingSemiProbabilisticDesignValueFactoryTest.cs =================================================================== diff -u -r4a27dfb1033419dd325dee88fd4abe3cb56e452d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/PipingSemiProbabilisticDesignValueFactoryTest.cs (.../PipingSemiProbabilisticDesignValueFactoryTest.cs) (revision 4a27dfb1033419dd325dee88fd4abe3cb56e452d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/PipingSemiProbabilisticDesignValueFactoryTest.cs (.../PipingSemiProbabilisticDesignValueFactoryTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -52,7 +52,7 @@ public void GetThicknessCoverageLayer_PipingInputWithCoverLayer_CreatePercentileBasedDesignVariableForThicknessCoverageLayer() { // Setup - PipingInput inputParameters = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput inputParameters = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); // Call DesignVariable thicknessCoverageLayer = PipingSemiProbabilisticDesignValueFactory.GetThicknessCoverageLayer(inputParameters); @@ -67,7 +67,7 @@ public void GetThicknessCoverageLayer_PipingInputWithoutCoverLayer_CreateDeterministicDesignVariableForThicknessCoverageLayer() { // Setup - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); // Call DesignVariable thicknessCoverageLayer = PipingSemiProbabilisticDesignValueFactory.GetThicknessCoverageLayer(inputParameters); @@ -82,7 +82,7 @@ public void GetEffectiveThicknessCoverageLayer_PipingInputWithCoverLayer_CreatePercentileBasedDesignVariableForEffectiveThicknessCoverageLayer() { // Setup - PipingInput inputParameters = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput inputParameters = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); // Call DesignVariable effectiveThicknessCoverageLayer = @@ -98,7 +98,7 @@ public void GetEffectiveThicknessCoverageLayer_PipingInputWithoutCoverLayer_CreateDeterministicDesignVariableForEffectiveThicknessCoverageLayer() { // Setup - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); // Call DesignVariable effectiveThicknessCoverageLayer = @@ -114,7 +114,7 @@ public void GetPhreaticLevelExit_ValidPipingCalculation_CreateDesignVariableForPhreaticLevelExit() { // Setup - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); // Call DesignVariable freaticLevelExit = @@ -129,7 +129,7 @@ public void GetDampingFactorExit_ValidPipingCalculation_CreateDesignVariableForDampingFactorExit() { // Setup - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); // Call DesignVariable dampingFactorExit = @@ -148,7 +148,7 @@ public void GetSeepageLength_ValidPipingCalculation_CreateDesignVariableForSeepageLength() { // Setup - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); // Call VariationCoefficientDesignVariable seepageLength = @@ -163,7 +163,7 @@ public void GetDiameter70_ValidPipingCalculation_CreateDesignVariableForDiameter70() { // Setup - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); // Call VariationCoefficientDesignVariable d70 = @@ -178,7 +178,7 @@ public void GetDarcyPermeability_ValidPipingCalculation_CreateDesignVariableForDarcyPermeability() { // Setup - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); // Call VariationCoefficientDesignVariable darcyPermeability = @@ -193,7 +193,7 @@ public void GetSaturatedVolumicWeightOfCoverageLayer_PipingInputWithCoverLayerWithSaturatedDefinition_CreateDesignVariableForSaturatedVolumicWeightOfCoverageLayer() { // Setup - PipingInput inputParameters = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); + MacroStabilityInwardsInput inputParameters = PipingInputFactory.CreateInputWithAquiferAndCoverageLayer(); inputParameters.StochasticSoilProfile.SoilProfile.Layers.ElementAt(0).BelowPhreaticLevelMean = 3.2; // Call @@ -211,7 +211,7 @@ public void GetSaturatedVolumicWeightOfCoverageLayer_PipingInputWithoutCoverLayer_CreateDeterministicDesignVariableForSaturatedVolumicWeightOfCoverageLayer() { // Setup - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); // Call DesignVariable saturatedVolumicWeightOfCoverageLayer = @@ -227,7 +227,7 @@ public void GetThicknessAquiferLayer_ValidPipingCalculation_CreateDesignVariableForThicknessAquiferLayer() { // Setup - var inputParameters = new PipingInput(new GeneralPipingInput()); + var inputParameters = new MacroStabilityInwardsInput(new GeneralPipingInput()); // Call DesignVariable thicknessAquiferLayer = Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/RingtoetsPipingSurfaceLineUpdateDataStrategyTest.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/RingtoetsPipingSurfaceLineUpdateDataStrategyTest.cs (.../RingtoetsPipingSurfaceLineUpdateDataStrategyTest.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/RingtoetsPipingSurfaceLineUpdateDataStrategyTest.cs (.../RingtoetsPipingSurfaceLineUpdateDataStrategyTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -692,12 +692,12 @@ // Assert Assert.IsTrue(unAffectedCalculation.HasOutput); - PipingInput unaffectedInput = unAffectedCalculation.InputParameters; + MacroStabilityInwardsInput unaffectedInput = unAffectedCalculation.InputParameters; Assert.AreSame(unaffectedSurfaceLine, unaffectedInput.SurfaceLine); Assert.AreEqual(unaffectedSurfaceLine, unaffectedInput.SurfaceLine); Assert.IsFalse(affectedCalculation.HasOutput); - PipingInput affectedInput = affectedCalculation.InputParameters; + MacroStabilityInwardsInput affectedInput = affectedCalculation.InputParameters; Assert.AreSame(affectedSurfaceLine, affectedInput.SurfaceLine); Assert.AreEqual(affectedSurfaceLine, affectedInput.SurfaceLine); @@ -776,7 +776,7 @@ }, "path").ToArray(); // Assert - PipingInput calculationInput = calculation.InputParameters; + MacroStabilityInwardsInput calculationInput = calculation.InputParameters; CollectionAssert.AreEquivalent(new IObservable[] { failureMechanism.SurfaceLines, @@ -867,7 +867,7 @@ }, "path").ToArray(); // Assert - PipingInput calculationInput = calculation.InputParameters; + MacroStabilityInwardsInput calculationInput = calculation.InputParameters; CollectionAssert.AreEquivalent(new IObservable[] { failureMechanism.SurfaceLines, @@ -926,7 +926,7 @@ "path").ToArray(); // Assert - PipingInput calculationInput = calculation.InputParameters; + MacroStabilityInwardsInput calculationInput = calculation.InputParameters; CollectionAssert.AreEquivalent(new IObservable[] { failureMechanism.SurfaceLines, @@ -979,7 +979,7 @@ "path").ToArray(); // Assert - PipingInput calculationInput = calculation.InputParameters; + MacroStabilityInwardsInput calculationInput = calculation.InputParameters; CollectionAssert.AreEquivalent(new IObservable[] { failureMechanism.SurfaceLines, @@ -1083,7 +1083,7 @@ }, "path").ToArray(); // Assert - PipingInput affectedInput = affectedCalculation.InputParameters; + MacroStabilityInwardsInput affectedInput = affectedCalculation.InputParameters; CollectionAssert.AreEquivalent(new IObservable[] { failureMechanism.SurfaceLines, @@ -1094,7 +1094,7 @@ CollectionAssert.AreEqual(importedSurfaceLine.Points, affectedSurfaceLine.Points); Assert.AreEqual(soilModels[0], affectedInput.StochasticSoilModel); - PipingInput unaffectedInput = unAffectedCalculation.InputParameters; + MacroStabilityInwardsInput unaffectedInput = unAffectedCalculation.InputParameters; Assert.AreSame(unaffectedSurfaceLine, unaffectedInput.SurfaceLine); CollectionAssert.AreEqual(unaffectedGeometry, unaffectedSurfaceLine.Points); Assert.IsNull(unaffectedInput.StochasticSoilModel); @@ -1210,7 +1210,7 @@ // Assert Assert.IsFalse(affectedCalculation.HasOutput); - PipingInput affectedInput = affectedCalculation.InputParameters; + MacroStabilityInwardsInput affectedInput = affectedCalculation.InputParameters; Assert.AreSame(affectedSurfaceLine, affectedInput.SurfaceLine); Assert.IsNaN(affectedInput.EntryPointL); CollectionAssert.AreEqual(importedAffectedSurfaceLine.Points, affectedSurfaceLine.Points); @@ -1281,7 +1281,7 @@ // Assert Assert.IsFalse(affectedCalculation.HasOutput); - PipingInput affectedInput = affectedCalculation.InputParameters; + MacroStabilityInwardsInput affectedInput = affectedCalculation.InputParameters; Assert.AreSame(affectedSurfaceLine, affectedInput.SurfaceLine); Assert.AreEqual(0, affectedInput.EntryPointL.Value); Assert.IsNaN(affectedInput.ExitPointL); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/PipingInputContextTreeNodeInfoTest.cs =================================================================== diff -u -r96c601320c699dc4e97e3568049f0b5e96067604 -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/PipingInputContextTreeNodeInfoTest.cs (.../PipingInputContextTreeNodeInfoTest.cs) (revision 96c601320c699dc4e97e3568049f0b5e96067604) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/PipingInputContextTreeNodeInfoTest.cs (.../PipingInputContextTreeNodeInfoTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -90,7 +90,7 @@ { // Setup var pipingInputContext = new PipingInputContext( - new PipingInput(new GeneralPipingInput()), + new MacroStabilityInwardsInput(new GeneralPipingInput()), new PipingCalculationScenario(new GeneralPipingInput()), Enumerable.Empty(), Enumerable.Empty(), @@ -111,7 +111,7 @@ { // Setup var pipingInputContext = new PipingInputContext( - new PipingInput(new GeneralPipingInput()), + new MacroStabilityInwardsInput(new GeneralPipingInput()), new PipingCalculationScenario(new GeneralPipingInput()), Enumerable.Empty(), Enumerable.Empty(), Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/PipingInputViewInfoTest.cs =================================================================== diff -u -r96c601320c699dc4e97e3568049f0b5e96067604 -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/PipingInputViewInfoTest.cs (.../PipingInputViewInfoTest.cs) (revision 96c601320c699dc4e97e3568049f0b5e96067604) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/PipingInputViewInfoTest.cs (.../PipingInputViewInfoTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -87,7 +87,7 @@ var assessmentSection = mocks.Stub(); mocks.ReplayAll(); - var pipingInput = new PipingInput(new GeneralPipingInput()); + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()); var calculation = new PipingCalculationScenario(new GeneralPipingInput()); var calculationInputContext = new PipingInputContext(pipingInput, calculation, Enumerable.Empty(), Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/PipingCalculationServiceTest.cs =================================================================== diff -u -r4a27dfb1033419dd325dee88fd4abe3cb56e452d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/PipingCalculationServiceTest.cs (.../PipingCalculationServiceTest.cs) (revision 4a27dfb1033419dd325dee88fd4abe3cb56e452d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/PipingCalculationServiceTest.cs (.../PipingCalculationServiceTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -918,7 +918,7 @@ public void Validate_CompleteInput_InputSetOnSubCalculators() { // Setup - PipingInput input = testCalculation.InputParameters; + MacroStabilityInwardsInput input = testCalculation.InputParameters; using (new PipingSubCalculatorFactoryConfig()) { @@ -1014,7 +1014,7 @@ public void Calculate_CompleteInput_InputSetOnSubCalculators() { // Setup - PipingInput input = testCalculation.InputParameters; + MacroStabilityInwardsInput input = testCalculation.InputParameters; using (new PipingSubCalculatorFactoryConfig()) { @@ -1026,7 +1026,7 @@ } } - private static void AssertSubCalculatorInputs(PipingInput input) + private static void AssertSubCalculatorInputs(MacroStabilityInwardsInput input) { var testFactory = (TestPipingSubCalculatorFactory) PipingSubCalculatorFactory.Instance; HeaveCalculatorStub heaveCalculator = testFactory.LastCreatedHeaveCalculator; Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/PipingDataSynchronizationServiceTest.cs =================================================================== diff -u -r4bd71eca0b6db2959ccb01d6504d1bf5058603bd -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/PipingDataSynchronizationServiceTest.cs (.../PipingDataSynchronizationServiceTest.cs) (revision 4bd71eca0b6db2959ccb01d6504d1bf5058603bd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/PipingDataSynchronizationServiceTest.cs (.../PipingDataSynchronizationServiceTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -525,7 +525,7 @@ foreach (PipingCalculationScenario pipingCalculationScenario in calculations) { - PipingInput input = pipingCalculationScenario.InputParameters; + MacroStabilityInwardsInput input = pipingCalculationScenario.InputParameters; StochasticSoilProfile currentProfile = input.StochasticSoilProfile; if (profileToDelete == null) { @@ -554,11 +554,11 @@ .Cast(); StochasticSoilProfile profileToDelete = null; - var expectedInputs = new List(); + var expectedInputs = new List(); foreach (PipingCalculationScenario pipingCalculationScenario in calculations) { - PipingInput input = pipingCalculationScenario.InputParameters; + MacroStabilityInwardsInput input = pipingCalculationScenario.InputParameters; StochasticSoilProfile currentProfile = input.StochasticSoilProfile; if (profileToDelete == null) { @@ -576,7 +576,7 @@ // Assert CollectionAssert.AreEquivalent(expectedInputs, affected); - CollectionAssert.IsEmpty(affected.Cast().Where(a => a.StochasticSoilProfile != null)); + CollectionAssert.IsEmpty(affected.Cast().Where(a => a.StochasticSoilProfile != null)); } [Test] @@ -594,7 +594,7 @@ foreach (PipingCalculationScenario pipingCalculationScenario in calculations) { - PipingInput input = pipingCalculationScenario.InputParameters; + MacroStabilityInwardsInput input = pipingCalculationScenario.InputParameters; StochasticSoilProfile currentProfile = input.StochasticSoilProfile; if (profileToDelete == null) { @@ -614,7 +614,7 @@ // Assert CollectionAssert.AreEquivalent(expectedAffectedObjects, affected); - CollectionAssert.IsEmpty(affected.OfType().Where(a => a.StochasticSoilProfile != null)); + CollectionAssert.IsEmpty(affected.OfType().Where(a => a.StochasticSoilProfile != null)); CollectionAssert.IsEmpty(affected.OfType().Where(a => a.HasOutput)); } @@ -656,7 +656,7 @@ foreach (PipingCalculationScenario pipingCalculationScenario in calculations) { - PipingInput input = pipingCalculationScenario.InputParameters; + MacroStabilityInwardsInput input = pipingCalculationScenario.InputParameters; StochasticSoilProfile currentProfile = input.StochasticSoilProfile; if (profileToDelete == null) { @@ -685,11 +685,11 @@ .Cast(); StochasticSoilProfile profileToDelete = null; - var expectedInputs = new List(); + var expectedInputs = new List(); foreach (PipingCalculationScenario pipingCalculationScenario in calculations) { - PipingInput input = pipingCalculationScenario.InputParameters; + MacroStabilityInwardsInput input = pipingCalculationScenario.InputParameters; StochasticSoilProfile currentProfile = input.StochasticSoilProfile; if (profileToDelete == null) { @@ -707,7 +707,7 @@ // Assert CollectionAssert.AreEquivalent(expectedInputs, affected); - CollectionAssert.IsEmpty(affected.Cast().Where(a => a.StochasticSoilProfile == null)); + CollectionAssert.IsEmpty(affected.Cast().Where(a => a.StochasticSoilProfile == null)); } [Test] @@ -725,7 +725,7 @@ foreach (PipingCalculationScenario pipingCalculationScenario in calculations) { - PipingInput input = pipingCalculationScenario.InputParameters; + MacroStabilityInwardsInput input = pipingCalculationScenario.InputParameters; StochasticSoilProfile currentProfile = input.StochasticSoilProfile; if (profileToDelete == null) { @@ -745,7 +745,7 @@ // Assert CollectionAssert.AreEquivalent(expectedAffectedObjects, affected); - CollectionAssert.IsEmpty(affected.OfType().Where(a => a.StochasticSoilProfile == null)); + CollectionAssert.IsEmpty(affected.OfType().Where(a => a.StochasticSoilProfile == null)); CollectionAssert.IsEmpty(affected.OfType().Where(a => a.HasOutput)); } } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/PipingInputServiceTest.cs =================================================================== diff -u -r4a27dfb1033419dd325dee88fd4abe3cb56e452d -r0bd99fbcdd44bb84757a0270af6f5085dbd76648 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/PipingInputServiceTest.cs (.../PipingInputServiceTest.cs) (revision 4a27dfb1033419dd325dee88fd4abe3cb56e452d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/PipingInputServiceTest.cs (.../PipingInputServiceTest.cs) (revision 0bd99fbcdd44bb84757a0270af6f5085dbd76648) @@ -33,7 +33,7 @@ { // Setup var soilModel = new StochasticSoilModel(1, "A", "B"); - var pipingInput = new PipingInput(new GeneralPipingInput()); + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()); // Call PipingInputService.SetMatchingStochasticSoilModel(pipingInput, new[] @@ -49,7 +49,7 @@ public void SetMatchingStochasticSoilModel_SurfaceLineOverlappingMultipleSoilModels_DoesNotSetModel() { // Setup - var pipingInput = new PipingInput(new GeneralPipingInput()); + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()); var soilModel1 = new StochasticSoilModel(1, "A", "B"); var soilModel2 = new StochasticSoilModel(2, "C", "D"); @@ -69,7 +69,7 @@ { // Setup var nonOverlappingSoilModel = new StochasticSoilModel(1, "A", "B"); - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { StochasticSoilModel = nonOverlappingSoilModel }; @@ -97,7 +97,7 @@ var soilModel = new StochasticSoilModel(1, "A", "B"); soilModel.StochasticSoilProfiles.Add(soilProfile); - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { StochasticSoilModel = soilModel }; @@ -119,7 +119,7 @@ new StochasticSoilProfile(0.0, SoilProfileType.SoilProfile1D, 1), new StochasticSoilProfile(1.0, SoilProfileType.SoilProfile1D, 2) }); - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { StochasticSoilModel = soilModel }; @@ -140,7 +140,7 @@ var soilModel = new StochasticSoilModel(1, "A", "B"); soilModel.StochasticSoilProfiles.Add(soilProfile); - var pipingInput = new PipingInput(new GeneralPipingInput()) + var pipingInput = new MacroStabilityInwardsInput(new GeneralPipingInput()) { StochasticSoilModel = soilModel, StochasticSoilProfile = soilProfile