Index: Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculator.cs =================================================================== diff -u -r847f6b97f0a6e007a89364ad12d0541bc0d84d1e -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculator.cs (.../PipingCalculator.cs) (revision 847f6b97f0a6e007a89364ad12d0541bc0d84d1e) +++ Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculator.cs (.../PipingCalculator.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -290,16 +290,23 @@ private EffectiveThicknessCalculator CalculateEffectiveThickness() { - var calculator = new EffectiveThicknessCalculator + try { - ExitPointXCoordinate = input.ExitPointXCoordinate, - PhreaticLevel = input.PhreaticLevelExit, - SoilProfile = PipingProfileCreator.Create(input.SoilProfile), - SurfaceLine = PipingSurfaceLineCreator.Create(input.SurfaceLine), - VolumicWeightOfWater = input.WaterVolumetricWeight - }; - calculator.Calculate(); - return calculator; + var calculator = new EffectiveThicknessCalculator + { + ExitPointXCoordinate = input.ExitPointXCoordinate, + PhreaticLevel = input.PhreaticLevelExit, + SoilProfile = PipingProfileCreator.Create(input.SoilProfile), + SurfaceLine = PipingSurfaceLineCreator.Create(input.SurfaceLine), + VolumicWeightOfWater = input.WaterVolumetricWeight + }; + calculator.Calculate(); + return calculator; + } + catch (SoilVolumicMassCalculatorException e) + { + throw new PipingCalculatorException(e.Message, e); + } } } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/GeneralPipingInput.cs =================================================================== diff -u -r67fc75b9da1684eb22a425825f63354146f908f5 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/src/Ringtoets.Piping.Data/GeneralPipingInput.cs (.../GeneralPipingInput.cs) (revision 67fc75b9da1684eb22a425825f63354146f908f5) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/GeneralPipingInput.cs (.../GeneralPipingInput.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -19,15 +19,13 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using Core.Common.Base; - namespace Ringtoets.Piping.Data { /// /// Class that holds all the overarching piping calculation input parameters, e.g. the /// values that apply for all calculations. /// - public class GeneralPipingInput : Observable + public class GeneralPipingInput { /// /// Initializes a new instance of the class. @@ -49,20 +47,6 @@ B = 350.0; } - #region Model Factors - - /// - /// Gets the calculation value used to account for uncertainty in the model for uplift. - /// - public double UpliftModelFactor { get; private set; } - - /// - /// Gets the calculation value used to account for uncertainty in the model for Sellmeijer. - /// - public double SellmeijerModelFactor { get; private set; } - - #endregion - #region General parameters (use by multiple calculations) /// @@ -82,6 +66,20 @@ #endregion + #region Model Factors + + /// + /// Gets the calculation value used to account for uncertainty in the model for uplift. + /// + public double UpliftModelFactor { get; private set; } + + /// + /// Gets the calculation value used to account for uncertainty in the model for Sellmeijer. + /// + public double SellmeijerModelFactor { get; private set; } + + #endregion + #region Sellmeijer specific parameters /// Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingCalculation.cs =================================================================== diff -u -rb743d495d10779d51c8f75b7cb04b5babb4b226f -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingCalculation.cs (.../PipingCalculation.cs) (revision b743d495d10779d51c8f75b7cb04b5babb4b226f) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingCalculation.cs (.../PipingCalculation.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; + using Core.Common.Base; using Ringtoets.Common.Data; using Ringtoets.Common.Placeholder; @@ -34,12 +36,20 @@ /// /// Constructs a new instance of with default values set for some of the parameters. /// - public PipingCalculation() + /// General piping calculation parameters that + /// are the same across all piping calculations. + /// When + /// is null. + public PipingCalculation(GeneralPipingInput generalInputParameters) { + if (generalInputParameters == null) + { + throw new ArgumentNullException("generalInputParameters"); + } Name = Resources.PipingCalculation_DefaultName; Comments = new InputPlaceholder(Resources.Comments_DisplayName); - InputParameters = new PipingInput(); + InputParameters = new PipingInput(generalInputParameters); } /// Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingFailureMechanism.cs =================================================================== diff -u -r67fc75b9da1684eb22a425825f63354146f908f5 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingFailureMechanism.cs (.../PipingFailureMechanism.cs) (revision 67fc75b9da1684eb22a425825f63354146f908f5) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingFailureMechanism.cs (.../PipingFailureMechanism.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -47,7 +47,7 @@ SoilProfiles = new ObservableList(); BoundaryConditions = new InputPlaceholder(RingtoetsCommonDataResources.FailureMechanism_BoundaryConditions_DisplayName); var pipingCalculationGroup = new PipingCalculationGroup(PipingDataResources.PipingFailureMechanism_Calculations_DisplayName, false); - pipingCalculationGroup.Children.Add(new PipingCalculation()); + pipingCalculationGroup.Children.Add(new PipingCalculation(GeneralInput)); CalculationsGroup = pipingCalculationGroup; AssessmentResult = new OutputPlaceholder(RingtoetsCommonDataResources.FailureMechanism_AssessmentResult_DisplayName); } Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs =================================================================== diff -u -r0c2ba533bc2cf8f4693c468e07f73737e2cc6644 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs (.../PipingInput.cs) (revision 0c2ba533bc2cf8f4693c468e07f73737e2cc6644) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs (.../PipingInput.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -20,7 +20,9 @@ // All rights reserved. using System; + using Core.Common.Base; + using Ringtoets.HydraRing.Data; using Ringtoets.Piping.Data.Probabilistics; using Ringtoets.Piping.Data.Properties; @@ -33,28 +35,28 @@ /// public class PipingInput : Observable { + public const double SeepageLengthStandardDeviationFraction = 0.1; + private readonly GeneralPipingInput generalInputParameters; private double assessmentLevel; private double exitPointL; - public const double SeepageLengthStandardDeviationFraction = 0.1; /// /// Initializes a new instance of the class. /// - public PipingInput() + /// General piping calculation parameters that + /// are the same across all piping calculations. + /// When + /// is null. + public PipingInput(GeneralPipingInput generalInputParameters) { - // Defaults as they have been defined in 'functional design semi-probabilistic assessments 1209431-008-ZWS-0009 Version 2 Final' - UpliftModelFactor = 1.0; - SellmeijerModelFactor = 1.0; - WaterVolumetricWeight = 10.0; - WhitesDragCoefficient = 0.25; - SandParticlesVolumicWeight = 16.5; - WaterKinematicViscosity = 1.33e-6; - Gravity = 9.81; - MeanDiameter70 = 2.08e-4; - BeddingAngle = 37.0; - SellmeijerReductionFactor = 0.3; - CriticalHeaveGradient = 0.3; + if (generalInputParameters == null) + { + throw new ArgumentNullException("generalInputParameters"); + } + this.generalInputParameters = generalInputParameters; + + // Defaults as they have been defined in 'functional design semi-probabilistic assessments 1209431-008-ZWS-0009 Version 2 Final' ExitPointL = double.NaN; PhreaticLevelExit = new NormalDistribution(); DampingFactorExit = new LognormalDistribution @@ -82,139 +84,205 @@ } /// - /// Gets or sets the reduction factor Sellmeijer. + /// Gets or sets the outside high water level. + /// [m] /// - public double SellmeijerReductionFactor { get; set; } + /// is . + public double AssessmentLevel + { + get + { + return assessmentLevel; + } + set + { + if (double.IsNaN(value)) + { + throw new ArgumentException(Resources.PipingInput_AssessmentLevel_Cannot_set_to_NaN); + } + assessmentLevel = value; + } + } /// - /// Gets or sets the volumetric weight of water. - /// [kN/m³] + /// Gets or sets 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 WaterVolumetricWeight { get; set; } + /// is less or equal to 0. + public double ExitPointL + { + get + { + return exitPointL; + } + set + { + if (value <= 0) + { + throw new ArgumentOutOfRangeException("value", Resources.PipingInput_ExitPointL_Value_must_be_greater_than_zero); + } + exitPointL = value; + } + } /// - /// Gets or sets the (lowerbound) volumic weight of sand grain material of a sand layer under water. - /// [kN/m³] + /// Gets or sets the piezometric head at the exit point. + /// [m] /// - public double SandParticlesVolumicWeight { get; set; } + public double PiezometricHeadExit { get; set; } /// - /// Gets or sets the White's drag coefficient. + /// Gets or sets the piezometric head in the hinterland. + /// [m] /// - public double WhitesDragCoefficient { get; set; } + public double PiezometricHeadPolder { get; set; } /// - /// Gets or sets the kinematic viscosity of water at 10 degrees Celsius. - /// [m²/s] + /// Gets or sets the surface line. /// - public double WaterKinematicViscosity { get; set; } + public RingtoetsPipingSurfaceLine SurfaceLine { get; set; } /// - /// Gets or sets the gravitational acceleration. - /// [m/s²] + /// Gets or sets the profile which contains a 1 dimensional definition of soil layers with properties. /// - public double Gravity { get; set; } + public PipingSoilProfile SoilProfile { get; set; } /// - /// Gets or sets the mean diameter of small scale tests applied to different kinds of sand, on which the formula of Sellmeijer has been fit. - /// [m] + /// Gets or set the hydraulic boundary location from which to use the assessment level. /// - public double MeanDiameter70 { get; set; } + public HydraulicBoundaryLocation HydraulicBoundaryLocation { get; set; } + #region General input parameters + /// - /// Gets or sets the angle of the force balance representing the amount in which sand grains resist rolling. - /// [°] + /// Gets or sets the reduction factor Sellmeijer. /// - public double BeddingAngle { get; set; } + public double SellmeijerReductionFactor + { + get + { + return generalInputParameters.SellmeijerReductionFactor; + } + } /// - /// Gets or sets the calculation value used to account for uncertainty in the model for uplift. + /// Gets or sets the volumetric weight of water. + /// [kN/m³] /// - public double UpliftModelFactor { get; set; } + public double WaterVolumetricWeight + { + get + { + return generalInputParameters.WaterVolumetricWeight; + } + } /// - /// Gets or sets the outside high water level. - /// [m] + /// Gets or sets the (lowerbound) volumic weight of sand grain material of a sand layer under water. + /// [kN/m³] /// - /// is . - public double AssessmentLevel + public double SandParticlesVolumicWeight { get { - return assessmentLevel; + return generalInputParameters.SandParticlesVolumicWeight; } - set - { - if (double.IsNaN(value)) - { - throw new ArgumentException(Resources.PipingInput_AssessmentLevel_Cannot_set_to_NaN); - } - assessmentLevel = value; - } } /// - /// Gets or sets the piezometric head at the exit point. - /// [m] + /// Gets or sets the White's drag coefficient. /// - public double PiezometricHeadExit { get; set; } + public double WhitesDragCoefficient + { + get + { + return generalInputParameters.WhitesDragCoefficient; + } + } /// - /// Gets or sets the piezometric head in the hinterland. - /// [m] + /// Gets or sets the kinematic viscosity of water at 10 degrees Celsius. + /// [m²/s] /// - public double PiezometricHeadPolder { get; set; } + public double WaterKinematicViscosity + { + get + { + return generalInputParameters.WaterKinematicViscosity; + } + } /// - /// Gets or sets the calculation value used to account for uncertainty in the model for Sellmeijer. + /// Gets or sets the gravitational acceleration. + /// [m/s²] /// - public double SellmeijerModelFactor { get; set; } + public double Gravity + { + get + { + return generalInputParameters.Gravity; + } + } /// - /// Gets or sets the L-coordinate of the exit point. + /// Gets or sets the mean diameter of small scale tests applied to different kinds of sand, on which the formula of Sellmeijer has been fit. /// [m] /// - /// is less or equal to 0. - public double ExitPointL + public double MeanDiameter70 { get { - return exitPointL; + return generalInputParameters.MeanDiameter70; } - set - { - if (value <= 0) - { - throw new ArgumentOutOfRangeException("value", Resources.PipingInput_ExitPointL_Value_must_be_greater_than_zero); - } - exitPointL = value; - } } - #region Constants - /// - /// Gets or sets the critical exit gradient for heave. + /// Gets or sets the angle of the force balance representing the amount in which sand grains resist rolling. + /// [°] /// - public double CriticalHeaveGradient { get; private set; } + public double BeddingAngle + { + get + { + return generalInputParameters.BeddingAngle; + } + } - #endregion - /// - /// Gets or sets the surface line. + /// Gets or sets the calculation value used to account for uncertainty in the model for uplift. /// - public RingtoetsPipingSurfaceLine SurfaceLine { get; set; } + public double UpliftModelFactor + { + get + { + return generalInputParameters.UpliftModelFactor; + } + } /// - /// Gets or sets the profile which contains a 1 dimensional definition of soil layers with properties. + /// Gets or sets the calculation value used to account for uncertainty in the model for Sellmeijer. /// - public PipingSoilProfile SoilProfile { get; set; } + public double SellmeijerModelFactor + { + get + { + return generalInputParameters.SellmeijerModelFactor; + } + } /// - /// Gets or set the hydraulic boundary location from which to use the assessment level. + /// Gets or sets the critical exit gradient for heave. /// - public HydraulicBoundaryLocation HydraulicBoundaryLocation { get; set; } + public double CriticalHeaveGradient + { + get + { + return generalInputParameters.CriticalHeaveGradient; + } + } + #endregion + #region Probabilistic parameters /// Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r80aeb6fb275f0d7ea3f470bb8ba0ef0fc5caa113 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 80aeb6fb275f0d7ea3f470bb8ba0ef0fc5caa113) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -116,6 +116,15 @@ } /// + /// Looks up a localized string similar to Semi-probabilistische parameters. + /// + public static string Categories_SemiProbabilisticParameters { + get { + return ResourceManager.GetString("Categories_SemiProbabilisticParameters", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Opbarsten. /// public static string Categories_Uplift { @@ -198,6 +207,240 @@ } /// + /// Looks up a localized string similar to De parameter 'a' die gebruikt wordt voor het lengte effect in berekening van de maximaal toelaatbare faalkans.. + /// + public static string GeneralPipingInput_A_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_A_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to a. + /// + public static string GeneralPipingInput_A_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_A_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De parameter 'b' die gebruikt wordt voor het lengte effect in berekening van de maximaal toelaatbare faalkans.. + /// + public static string GeneralPipingInput_B_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_B_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hoek in het krachtenevenwicht die aangeeft hoeveel weerstand de korrels bieden tegen rollen; ook beddingshoek genoemd.. + /// + public static string GeneralPipingInput_BeddingAngle_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_BeddingAngle_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rolweerstandshoek [º]. + /// + public static string GeneralPipingInput_BeddingAngle_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_BeddingAngle_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kritiek verhang met betrekking tot heave.. + /// + public static string GeneralPipingInput_CriticalHeaveGradient_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_CriticalHeaveGradient_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kritiek verhang m.b.t. heave [-]. + /// + public static string GeneralPipingInput_CriticalHeaveGradient_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_CriticalHeaveGradient_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Valversnelling. + /// + public static string GeneralPipingInput_Gravity_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_Gravity_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Valversnelling [m/s²]. + /// + public static string GeneralPipingInput_Gravity_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_Gravity_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Gemiddelde d70 van de in kleine schaalproeven toegepaste zandsoorten, waarop formule van Sellmeijer is gefit.. + /// + public static string GeneralPipingInput_MeanDiameter70_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_MeanDiameter70_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Referentiewaarde voor 70%-fraktiel in Sellmeijer regel [m]. + /// + public static string GeneralPipingInput_MeanDiameter70_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_MeanDiameter70_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Het (ondergedompelde) volumegewicht van zandkorrelmateriaal van een zandlaag.. + /// + public static string GeneralPipingInput_SandParticlesVolumicWeight_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_SandParticlesVolumicWeight_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Volumiek gewicht van de zandkorrels onder water [kN/m³]. + /// + public static string GeneralPipingInput_SandParticlesVolumicWeight_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_SandParticlesVolumicWeight_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rekenwaarde om de modelonzekerheid in het model van Sellmeijer in rekening te brengen.. + /// + public static string GeneralPipingInput_SellmeijerModelFactor_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_SellmeijerModelFactor_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Modelfactor piping toegepast op Sellmeijermodel [-]. + /// + public static string GeneralPipingInput_SellmeijerModelFactor_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_SellmeijerModelFactor_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reductiefactor Sellmeijer.. + /// + public static string GeneralPipingInput_SellmeijerReductionFactor_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_SellmeijerReductionFactor_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reductiefactor Sellmeijer [-]. + /// + public static string GeneralPipingInput_SellmeijerReductionFactor_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_SellmeijerReductionFactor_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rekenwaarde om de modelonzekerheid in het model van opbarsten in rekening te brengen.. + /// + public static string GeneralPipingInput_UpliftModelFactor_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_UpliftModelFactor_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Modelfactor opbarsten [-]. + /// + public static string GeneralPipingInput_UpliftModelFactor_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_UpliftModelFactor_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kinematische viscositeit van water bij 10º Celsius.. + /// + public static string GeneralPipingInput_WaterKinematicViscosity_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_WaterKinematicViscosity_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kinematische viscositeit van water bij 10º Celsius [m²/s]. + /// + public static string GeneralPipingInput_WaterKinematicViscosity_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_WaterKinematicViscosity_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Volumiek gewicht van water.. + /// + public static string GeneralPipingInput_WaterVolumetricWeight_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_WaterVolumetricWeight_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Volumiek gewicht van water [kN/m³]. + /// + public static string GeneralPipingInput_WaterVolumetricWeight_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_WaterVolumetricWeight_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sleepkrachtfactor volgens White.. + /// + public static string GeneralPipingInput_WhitesDragCoefficient_Description { + get { + return ResourceManager.GetString("GeneralPipingInput_WhitesDragCoefficient_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Coëfficiënt van White [-]. + /// + public static string GeneralPipingInput_WhitesDragCoefficient_DisplayName { + get { + return ResourceManager.GetString("GeneralPipingInput_WhitesDragCoefficient_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to b. + /// + public static string GenerapPipingInput_B_DisplayName { + get { + return ResourceManager.GetString("GenerapPipingInput_B_DisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Importeer ondergrondschematiseringen. /// public static string Import_SoilProfiles { @@ -552,42 +795,6 @@ } /// - /// Looks up a localized string similar to Hoek in het krachtenevenwicht die aangeeft hoeveel weerstand de korrels bieden tegen rollen; ook beddingshoek genoemd.. - /// - public static string PipingInput_BeddingAngle_Description { - get { - return ResourceManager.GetString("PipingInput_BeddingAngle_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Rolweerstandshoek [º]. - /// - public static string PipingInput_BeddingAngle_DisplayName { - get { - return ResourceManager.GetString("PipingInput_BeddingAngle_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Kritiek verhang met betrekking tot heave.. - /// - public static string PipingInput_CriticalHeaveGradient_Description { - get { - return ResourceManager.GetString("PipingInput_CriticalHeaveGradient_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Kritiek verhang m.b.t. heave [-]. - /// - public static string PipingInput_CriticalHeaveGradient_DisplayName { - get { - return ResourceManager.GetString("PipingInput_CriticalHeaveGradient_DisplayName", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Dempingsfactor relateert respons van stijghoogte bij binnenteen aan buitenwaterstand.. /// public static string PipingInput_DampingFactorExit_Description { @@ -678,24 +885,6 @@ } /// - /// Looks up a localized string similar to Valversnelling. - /// - public static string PipingInput_Gravity_Description { - get { - return ResourceManager.GetString("PipingInput_Gravity_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Valversnelling [m/s²]. - /// - public static string PipingInput_Gravity_DisplayName { - get { - return ResourceManager.GetString("PipingInput_Gravity_DisplayName", resourceCulture); - } - } - - /// /// Looks up a localized string similar to De locatie met hydraulische randvoorwaarden waarvan het berekende toetspeil wordt gebruikt.. /// public static string PipingInput_HydraulicBoundaryLocation_Description { @@ -714,24 +903,6 @@ } /// - /// Looks up a localized string similar to Gemiddelde d70 van de in kleine schaalproeven toegepaste zandsoorten, waarop formule van Sellmeijer is gefit.. - /// - public static string PipingInput_MeanDiameter70_Description { - get { - return ResourceManager.GetString("PipingInput_MeanDiameter70_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Referentiewaarde voor 70%-fraktiel in Sellmeijer regel [m]. - /// - public static string PipingInput_MeanDiameter70_DisplayName { - get { - return ResourceManager.GetString("PipingInput_MeanDiameter70_DisplayName", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Freatische waterstand bij uittredepunt.. /// public static string PipingInput_PhreaticLevelExit_Description { @@ -786,24 +957,6 @@ } /// - /// Looks up a localized string similar to Het (ondergedompelde) volumegewicht van zandkorrelmateriaal van een zandlaag.. - /// - public static string PipingInput_SandParticlesVolumicWeight_Description { - get { - return ResourceManager.GetString("PipingInput_SandParticlesVolumicWeight_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Volumiek gewicht van de zandkorrels onder water [kN/m³]. - /// - public static string PipingInput_SandParticlesVolumicWeight_DisplayName { - get { - return ResourceManager.GetString("PipingInput_SandParticlesVolumicWeight_DisplayName", resourceCulture); - } - } - - /// /// Looks up a localized string similar to De horizontale afstand tussen intrede- en uittredepunt die het kwelwater ondergronds aflegt voordat het weer aan de oppervlakte komt.. /// public static string PipingInput_SeepageLength_Description { @@ -822,42 +975,6 @@ } /// - /// Looks up a localized string similar to Rekenwaarde om de modelonzekerheid in het model van Sellmeijer in rekening te brengen.. - /// - public static string PipingInput_SellmeijerModelFactor_Description { - get { - return ResourceManager.GetString("PipingInput_SellmeijerModelFactor_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Modelfactor piping toegepast op Sellmeijermodel [-]. - /// - public static string PipingInput_SellmeijerModelFactor_DisplayName { - get { - return ResourceManager.GetString("PipingInput_SellmeijerModelFactor_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reductiefactor Sellmeijer.. - /// - public static string PipingInput_SellmeijerReductionFactor_Description { - get { - return ResourceManager.GetString("PipingInput_SellmeijerReductionFactor_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reductiefactor Sellmeijer [-]. - /// - public static string PipingInput_SellmeijerReductionFactor_DisplayName { - get { - return ResourceManager.GetString("PipingInput_SellmeijerReductionFactor_DisplayName", resourceCulture); - } - } - - /// /// Looks up a localized string similar to De ondergrondschematisering die voor de piping berekening gebruikt wordt.. /// public static string PipingInput_SoilProfile_Description { @@ -930,78 +1047,6 @@ } /// - /// Looks up a localized string similar to Rekenwaarde om de modelonzekerheid in het model van opbarsten in rekening te brengen.. - /// - public static string PipingInput_UpliftModelFactor_Description { - get { - return ResourceManager.GetString("PipingInput_UpliftModelFactor_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Modelfactor opbarsten [-]. - /// - public static string PipingInput_UpliftModelFactor_DisplayName { - get { - return ResourceManager.GetString("PipingInput_UpliftModelFactor_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Kinematische viscositeit van water bij 10º Celsius.. - /// - public static string PipingInput_WaterKinematicViscosity_Description { - get { - return ResourceManager.GetString("PipingInput_WaterKinematicViscosity_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Kinematische viscositeit van water bij 10º Celsius [m²/s]. - /// - public static string PipingInput_WaterKinematicViscosity_DisplayName { - get { - return ResourceManager.GetString("PipingInput_WaterKinematicViscosity_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Volumiek gewicht van water.. - /// - public static string PipingInput_WaterVolumetricWeight_Description { - get { - return ResourceManager.GetString("PipingInput_WaterVolumetricWeight_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Volumiek gewicht van water [kN/m³]. - /// - public static string PipingInput_WaterVolumetricWeight_DisplayName { - get { - return ResourceManager.GetString("PipingInput_WaterVolumetricWeight_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sleepkrachtfactor volgens White.. - /// - public static string PipingInput_WhitesDragCoefficient_Description { - get { - return ResourceManager.GetString("PipingInput_WhitesDragCoefficient_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Coëfficiënt van White [-]. - /// - public static string PipingInput_WhitesDragCoefficient_DisplayName { - get { - return ResourceManager.GetString("PipingInput_WhitesDragCoefficient_DisplayName", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Invoer. /// public static string PipingInputContext_NodeDisplayName { Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx =================================================================== diff -u -r80aeb6fb275f0d7ea3f470bb8ba0ef0fc5caa113 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx (.../Resources.resx) (revision 80aeb6fb275f0d7ea3f470bb8ba0ef0fc5caa113) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx (.../Resources.resx) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -130,16 +130,16 @@ Toetspeil [m+NAP] - + Hoek in het krachtenevenwicht die aangeeft hoeveel weerstand de korrels bieden tegen rollen; ook beddingshoek genoemd. - + Rolweerstandshoek [º] - + Kritiek verhang met betrekking tot heave. - + Kritiek verhang m.b.t. heave [-] @@ -160,16 +160,16 @@ 70%-fraktiel van de korreldiameter in de bovenste zandlaag [m] - + Valversnelling - + Valversnelling [m/s²] - + Gemiddelde d70 van de in kleine schaalproeven toegepaste zandsoorten, waarop formule van Sellmeijer is gefit. - + Referentiewaarde voor 70%-fraktiel in Sellmeijer regel [m] @@ -193,10 +193,10 @@ Piping - + Het (ondergedompelde) volumegewicht van zandkorrelmateriaal van een zandlaag. - + Volumiek gewicht van de zandkorrels onder water [kN/m³] @@ -205,16 +205,16 @@ Kwelweglengte [m] - + Rekenwaarde om de modelonzekerheid in het model van Sellmeijer in rekening te brengen. - + Modelfactor piping toegepast op Sellmeijermodel [-] - + Reductiefactor Sellmeijer. - + Reductiefactor Sellmeijer [-] @@ -229,28 +229,28 @@ Totale deklaagdikte bij uittredepunt [m] - + Rekenwaarde om de modelonzekerheid in het model van opbarsten in rekening te brengen. - + Modelfactor opbarsten [-] - + Kinematische viscositeit van water bij 10º Celsius. - + Kinematische viscositeit van water bij 10º Celsius [m²/s] - + Volumiek gewicht van water. - + Volumiek gewicht van water [kN/m³] - + Sleepkrachtfactor volgens White. - + Coëfficiënt van White [-] @@ -583,4 +583,19 @@ Kan deklaagdikte niet afleiden op basis van de invoer. + + Semi-probabilistische parameters + + + De parameter 'a' die gebruikt wordt voor het lengte effect in berekening van de maximaal toelaatbare faalkans. + + + a + + + De parameter 'b' die gebruikt wordt voor het lengte effect in berekening van de maximaal toelaatbare faalkans. + + + b + \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/GeneralPipingInputProperties.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/GeneralPipingInputProperties.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/GeneralPipingInputProperties.cs (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -0,0 +1,191 @@ +using Core.Common.Gui.Attributes; +using Core.Common.Gui.PropertyBag; +using Core.Common.Utils.Attributes; + +using Ringtoets.Piping.Data; +using Ringtoets.Piping.Forms.Properties; + +namespace Ringtoets.Piping.Forms.PropertyClasses +{ + /// + /// ViewModel of for properties panel. + /// + public class GeneralPipingInputProperties : ObjectProperties + { + #region Model Factors + + [PropertyOrder(1)] + [ResourcesCategory(typeof(Resources), "Categories_ModelFactors")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_UpliftModelFactor_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_UpliftModelFactor_Description")] + public double UpliftModelFactor + { + get + { + return data.UpliftModelFactor; + } + } + + [PropertyOrder(2)] + [ResourcesCategory(typeof(Resources), "Categories_ModelFactors")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_SellmeijerModelFactor_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_SellmeijerModelFactor_Description")] + public double SellmeijerModelFactor + { + get + { + return data.SellmeijerModelFactor; + } + } + + #endregion + + #region General + + [PropertyOrder(11)] + [ResourcesCategory(typeof(Resources), "Categories_General")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_WaterVolumetricWeight_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_WaterVolumetricWeight_Description")] + public double WaterVolumetricWeight + { + get + { + return data.WaterVolumetricWeight; + } + } + + #endregion + + #region Heave + + [PropertyOrder(21)] + [ResourcesCategory(typeof(Resources), "Categories_Heave")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_CriticalHeaveGradient_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_CriticalHeaveGradient_Description")] + public double CriticalHeaveGradient + { + get + { + return data.CriticalHeaveGradient; + } + } + + #endregion + + #region Sellmeijer + + [PropertyOrder(31)] + [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_SandParticlesVolumicWeight_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_SandParticlesVolumicWeight_Description")] + public double SandParticlesVolumicWeight + { + get + { + return data.SandParticlesVolumicWeight; + } + } + + [PropertyOrder(32)] + [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_WhitesDragCoefficient_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_WhitesDragCoefficient_Description")] + public double WhitesDragCoefficient + { + get + { + return data.WhitesDragCoefficient; + } + } + + [PropertyOrder(33)] + [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_BeddingAngle_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_BeddingAngle_Description")] + public double BeddingAngle + { + get + { + return data.BeddingAngle; + } + } + + [PropertyOrder(34)] + [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_WaterKinematicViscosity_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_WaterKinematicViscosity_Description")] + public double WaterKinematicViscosity + { + get + { + return data.WaterKinematicViscosity; + } + } + + [PropertyOrder(35)] + [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_Gravity_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_Gravity_Description")] + public double Gravity + { + get + { + return data.Gravity; + } + } + + [PropertyOrder(36)] + [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_MeanDiameter70_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_MeanDiameter70_Description")] + public double MeanDiameter70 + { + get + { + return data.MeanDiameter70; + } + } + + [PropertyOrder(37)] + [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_SellmeijerReductionFactor_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_SellmeijerReductionFactor_Description")] + public double SellmeijerReductionFactor + { + get + { + return data.SellmeijerReductionFactor; + } + } + + #endregion + + #region Semi-probabilistic parameters + + [PropertyOrder(41)] + [ResourcesCategory(typeof(Resources), "Categories_SemiProbabilisticParameters")] + [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_A_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_A_Description")] + public double A + { + get + { + return data.A; + } + } + + [PropertyOrder(42)] + [ResourcesCategory(typeof(Resources), "Categories_SemiProbabilisticParameters")] + [ResourcesDisplayName(typeof(Resources), "GenerapPipingInput_B_DisplayName")] + [ResourcesDescription(typeof(Resources), "GeneralPipingInput_B_Description")] + public double B + { + get + { + return data.B; + } + } + + #endregion + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs =================================================================== diff -u -rbbfd376aee76613b471f70d2b1214d7e7b08fb1f -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs (.../PipingInputContextProperties.cs) (revision bbfd376aee76613b471f70d2b1214d7e7b08fb1f) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingInputContextProperties.cs (.../PipingInputContextProperties.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -37,6 +37,9 @@ namespace Ringtoets.Piping.Forms.PropertyClasses { + /// + /// ViewModel of for properties panel. + /// public class PipingInputContextProperties : ObjectProperties { /// @@ -63,19 +66,6 @@ return data.AvailableHydraulicBoundaryLocations; } - private double WaterVolumetricWeight - { - get - { - return data.WrappedData.WaterVolumetricWeight; - } - set - { - data.WrappedData.WaterVolumetricWeight = value; - data.WrappedData.NotifyObservers(); - } - } - private double PiezometricHeadPolder { get @@ -220,56 +210,9 @@ #endregion - #region Model Factors - - [ResourcesCategory(typeof(Resources), "Categories_ModelFactors")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_UpliftModelFactor_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_UpliftModelFactor_Description")] - public double UpliftModelFactor - { - get - { - return data.WrappedData.UpliftModelFactor; - } - set - { - data.WrappedData.UpliftModelFactor = value; - data.WrappedData.NotifyObservers(); - } - } - - [ResourcesCategory(typeof(Resources), "Categories_ModelFactors")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_SellmeijerModelFactor_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_SellmeijerModelFactor_Description")] - public double SellmeijerModelFactor - { - get - { - return data.WrappedData.SellmeijerModelFactor; - } - set - { - data.WrappedData.SellmeijerModelFactor = value; - data.WrappedData.NotifyObservers(); - } - } - - #endregion - #region Heave [ResourcesCategory(typeof(Resources), "Categories_Heave")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_CriticalHeaveGradient_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_CriticalHeaveGradient_Description")] - public double CriticalHeaveGradient - { - get - { - return data.WrappedData.CriticalHeaveGradient; - } - } - - [ResourcesCategory(typeof(Resources), "Categories_Heave")] [ResourcesDisplayName(typeof(Resources), "PipingInput_PiezometricHeadExit_DisplayName")] [ResourcesDescription(typeof(Resources), "PipingInput_PiezometricHeadExit_Description")] public double PiezometricHeadExitHeave @@ -384,21 +327,6 @@ } [ResourcesCategory(typeof(Resources), "Categories_Uplift")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_WaterVolumetricWeight_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_WaterVolumetricWeight_Description")] - public double WaterVolumetricWeightUplift - { - get - { - return WaterVolumetricWeight; - } - set - { - WaterVolumetricWeight = value; - } - } - - [ResourcesCategory(typeof(Resources), "Categories_Uplift")] [ResourcesDisplayName(typeof(Resources), "PipingInput_AssessmentLevel_DisplayName")] [ResourcesDescription(typeof(Resources), "PipingInput_AssessmentLevel_Description")] public double AssessmentLevelUplift @@ -510,22 +438,6 @@ } } - [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_SellmeijerReductionFactor_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_SellmeijerReductionFactor_Description")] - public double SellmeijerReductionFactor - { - get - { - return data.WrappedData.SellmeijerReductionFactor; - } - set - { - data.WrappedData.SellmeijerReductionFactor = value; - data.WrappedData.NotifyObservers(); - } - } - [TypeConverter(typeof(LognormalDistributionDesignVariableTypeConverter))] [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] [ResourcesDisplayName(typeof(Resources), "PipingInput_ThicknessCoverageLayer_DisplayName")] @@ -559,38 +471,6 @@ } } - [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_SandParticlesVolumicWeight_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_SandParticlesVolumicWeight_Description")] - public double SandParticlesVolumicWeight - { - get - { - return data.WrappedData.SandParticlesVolumicWeight; - } - set - { - data.WrappedData.SandParticlesVolumicWeight = value; - data.WrappedData.NotifyObservers(); - } - } - - [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_WhitesDragCoefficient_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_WhitesDragCoefficient_Description")] - public double WhitesDragCoefficient - { - get - { - return data.WrappedData.WhitesDragCoefficient; - } - set - { - data.WrappedData.WhitesDragCoefficient = value; - data.WrappedData.NotifyObservers(); - } - } - [TypeConverter(typeof(LognormalDistributionDesignVariableTypeConverter))] [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] [ResourcesDisplayName(typeof(Resources), "PipingInput_Diameter70_DisplayName")] @@ -608,21 +488,6 @@ } } - [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_WaterVolumetricWeight_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_WaterVolumetricWeight_Description")] - public double WaterVolumetricWeightSellmeijer - { - get - { - return WaterVolumetricWeight; - } - set - { - WaterVolumetricWeight = value; - } - } - [TypeConverter(typeof(LognormalDistributionDesignVariableTypeConverter))] [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] [ResourcesDisplayName(typeof(Resources), "PipingInput_DarcyPermeability_DisplayName")] @@ -640,38 +505,6 @@ } } - [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_WaterKinematicViscosity_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_WaterKinematicViscosity_Description")] - public double WaterKinematicViscosity - { - get - { - return data.WrappedData.WaterKinematicViscosity; - } - set - { - data.WrappedData.WaterKinematicViscosity = value; - data.WrappedData.NotifyObservers(); - } - } - - [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_Gravity_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_Gravity_Description")] - public double Gravity - { - get - { - return data.WrappedData.Gravity; - } - set - { - data.WrappedData.Gravity = value; - data.WrappedData.NotifyObservers(); - } - } - [TypeConverter(typeof(LognormalDistributionDesignVariableTypeConverter))] [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] [ResourcesDisplayName(typeof(Resources), "PipingInput_ThicknessAquiferLayer_DisplayName")] @@ -689,38 +522,6 @@ } } - [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_MeanDiameter70_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_MeanDiameter70_Description")] - public double MeanDiameter70 - { - get - { - return data.WrappedData.MeanDiameter70; - } - set - { - data.WrappedData.MeanDiameter70 = value; - data.WrappedData.NotifyObservers(); - } - } - - [ResourcesCategory(typeof(Resources), "Categories_Sellmeijer")] - [ResourcesDisplayName(typeof(Resources), "PipingInput_BeddingAngle_DisplayName")] - [ResourcesDescription(typeof(Resources), "PipingInput_BeddingAngle_Description")] - public double BeddingAngle - { - get - { - return data.WrappedData.BeddingAngle; - } - set - { - data.WrappedData.BeddingAngle = value; - data.WrappedData.NotifyObservers(); - } - } - #endregion } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj =================================================================== diff -u -r8b40a436f54ae91cbecd2b1e053311466711bf53 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision 8b40a436f54ae91cbecd2b1e053311466711bf53) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -65,6 +65,7 @@ True Resources.resx + Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs =================================================================== diff -u -r80aeb6fb275f0d7ea3f470bb8ba0ef0fc5caa113 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs (.../PipingGuiPlugin.cs) (revision 80aeb6fb275f0d7ea3f470bb8ba0ef0fc5caa113) +++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs (.../PipingGuiPlugin.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -57,6 +57,10 @@ public override IEnumerable GetPropertyInfos() { + yield return new PropertyInfo + { + GetObjectPropertiesData = mechanism => mechanism.WrappedData.GeneralInput + }; yield return new PropertyInfo(); yield return new PropertyInfo(); yield return new PropertyInfo(); @@ -346,7 +350,7 @@ private void AddCalculation(PipingFailureMechanism failureMechanism) { - var calculation = new PipingCalculation + var calculation = new PipingCalculation(failureMechanism.GeneralInput) { Name = NamingHelper.GetUniqueName(failureMechanism.CalculationsGroup.Children, PipingDataResources.PipingCalculation_DefaultName, c => c.Name) }; @@ -555,7 +559,7 @@ PipingFormsResources.PipingCalculationGroup_Add_PipingCalculation_ToolTip, PipingFormsResources.PipingIcon, (o, args) => { - var calculation = new PipingCalculation + var calculation = new PipingCalculation(nodeData.PipingFailureMechanism.GeneralInput) { Name = NamingHelper.GetUniqueName(group.Children, PipingDataResources.PipingCalculation_DefaultName, c => c.Name) }; Index: Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingSemiProbabilisticDesignValueFactoryTest.cs =================================================================== diff -u -rfb32e3411873a7b4c567792b9f335eba462e2702 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingSemiProbabilisticDesignValueFactoryTest.cs (.../PipingSemiProbabilisticDesignValueFactoryTest.cs) (revision fb32e3411873a7b4c567792b9f335eba462e2702) +++ Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingSemiProbabilisticDesignValueFactoryTest.cs (.../PipingSemiProbabilisticDesignValueFactoryTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -13,7 +13,7 @@ public void GetThicknessCoverageLayer_ValidPipingCalculation_CreateDesignVariableForThicknessCoverageLayer() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); // Call var thicknessCoverageLayer = PipingSemiProbabilisticDesignValueFactory.GetThicknessCoverageLayer(inputParameters); @@ -27,7 +27,7 @@ public void GetPhreaticLevelExit_ValidPipingCalculation_CreateDesignVariableForPhreaticLevelExit() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); // Call var freaticLevelExit = PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(inputParameters); @@ -41,7 +41,7 @@ public void GetDampingFactorExit_ValidPipingCalculation_CreateDesignVariableForDampingFactorExit() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); // Call var dampingFactorExit = PipingSemiProbabilisticDesignValueFactory.GetDampingFactorExit(inputParameters); @@ -59,7 +59,7 @@ public void GetSeepageLength_ValidPipingCalculation_CreateDesignVariableForSeepageLength() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); // Call var seepageLength = PipingSemiProbabilisticDesignValueFactory.GetSeepageLength(inputParameters); @@ -73,7 +73,7 @@ public void GetDiameter70_ValidPipingCalculation_CreateDesignVariableForDiameter70() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); // Call var d70 = PipingSemiProbabilisticDesignValueFactory.GetDiameter70(inputParameters); @@ -87,7 +87,7 @@ public void GetDarcyPermeability_ValidPipingCalculation_CreateDesignVariableForDarcyPermeability() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); // Call var darcyPermeability = PipingSemiProbabilisticDesignValueFactory.GetDarcyPermeability(inputParameters); @@ -101,7 +101,7 @@ public void GetThicknessAquiferLayer_ValidPipingCalculation_CreateDesignVariableForThicknessAquiferLayer() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); // Call var thicknessAquiferLayer = PipingSemiProbabilisticDesignValueFactory.GetThicknessAquiferLayer(inputParameters); Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/GeneralPipingInputTest.cs =================================================================== diff -u -r67fc75b9da1684eb22a425825f63354146f908f5 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/GeneralPipingInputTest.cs (.../GeneralPipingInputTest.cs) (revision 67fc75b9da1684eb22a425825f63354146f908f5) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/GeneralPipingInputTest.cs (.../GeneralPipingInputTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -1,7 +1,5 @@ -using Core.Common.Base; +using NUnit.Framework; -using NUnit.Framework; - namespace Ringtoets.Piping.Data.Test { [TestFixture] @@ -14,8 +12,6 @@ var inputParameters = new GeneralPipingInput(); // Assert - Assert.IsInstanceOf(inputParameters); - Assert.AreEqual(1.0, inputParameters.UpliftModelFactor); Assert.AreEqual(1.0, inputParameters.SellmeijerModelFactor); Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/IPipingCalculationItemExtensionsTest.cs =================================================================== diff -u -red0b4ea830beb801bcc0e3eb5b28993001ed2981 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/IPipingCalculationItemExtensionsTest.cs (.../IPipingCalculationItemExtensionsTest.cs) (revision ed0b4ea830beb801bcc0e3eb5b28993001ed2981) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/IPipingCalculationItemExtensionsTest.cs (.../IPipingCalculationItemExtensionsTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -12,7 +12,7 @@ public void GetPipingCalculations_FromPipingCalculation_ReturnThatCalculationInstance() { // Setup - IPipingCalculationItem calculation = new PipingCalculation(); + IPipingCalculationItem calculation = new PipingCalculation(new GeneralPipingInput()); // Call IEnumerable result = calculation.GetPipingCalculations(); @@ -56,10 +56,11 @@ public void GetPipingCalculations_FromPipingCalculationGroupWithGroupsAndCalculations_ReturnAllCalculationsRecursiveslyInAnyOrder() { // Setup - var calculation1 = new PipingCalculation(); - var calculation2 = new PipingCalculation(); - var calculation3 = new PipingCalculation(); - var calculation4 = new PipingCalculation(); + var generalPipingInput = new GeneralPipingInput(); + var calculation1 = new PipingCalculation(generalPipingInput); + var calculation2 = new PipingCalculation(generalPipingInput); + var calculation3 = new PipingCalculation(generalPipingInput); + var calculation4 = new PipingCalculation(generalPipingInput); var subsubGroup = new PipingCalculationGroup(); subsubGroup.Children.Add(calculation4); @@ -109,8 +110,9 @@ public void GetPipingCalculations_FromArrayWithCalculations_ReturnAllThoseCalculationsInAnyOrder() { // Setup - var calculation1 = new PipingCalculation(); - var calculation2 = new PipingCalculation(); + var generalInputParameters = new GeneralPipingInput(); + var calculation1 = new PipingCalculation(generalInputParameters); + var calculation2 = new PipingCalculation(generalInputParameters); IEnumerable calculationArray = new[] { calculation1, calculation2 }; // Call @@ -139,11 +141,12 @@ public void GetPipingCalculations_FromArrayWithMixedGroupsAndCalculations_ReturnAllCalculationsInAnyOrder() { // Setup - var rootcalculation = new PipingCalculation(); - var calculation1 = new PipingCalculation(); - var calculation2 = new PipingCalculation(); - var calculation3 = new PipingCalculation(); - var calculation4 = new PipingCalculation(); + var generalInputParameters = new GeneralPipingInput(); + var rootcalculation = new PipingCalculation(generalInputParameters); + var calculation1 = new PipingCalculation(generalInputParameters); + var calculation2 = new PipingCalculation(generalInputParameters); + var calculation3 = new PipingCalculation(generalInputParameters); + var calculation4 = new PipingCalculation(generalInputParameters); var subsubGroup = new PipingCalculationGroup(); subsubGroup.Children.Add(calculation4); Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingCalculationGroupTest.cs =================================================================== diff -u -r5d8ec84a539b705b777fecbaf8f111bffa7bb63b -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingCalculationGroupTest.cs (.../PipingCalculationGroupTest.cs) (revision 5d8ec84a539b705b777fecbaf8f111bffa7bb63b) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingCalculationGroupTest.cs (.../PipingCalculationGroupTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -87,7 +87,7 @@ public void Children_AddPipingCalculation_CalculationAddedToCollection() { // Setup - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var group = new PipingCalculationGroup(); @@ -103,7 +103,7 @@ public void Children_RemovePipingCalculation_CalculationRemovedFromCollection() { // Setup - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var group = new PipingCalculationGroup(); group.Children.Add(calculation); @@ -122,8 +122,9 @@ public void Children_AddPipingCalculationAtIndex_CalculationAddedToCollectionAtIndex(int index) { // Setup - var calculation = new PipingCalculation(); - var calculationToInsert = new PipingCalculation(); + var generalInputParameters = new GeneralPipingInput(); + var calculation = new PipingCalculation(generalInputParameters); + var calculationToInsert = new PipingCalculation(generalInputParameters); var group = new PipingCalculationGroup(); group.Children.Add(calculation); Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingCalculationTest.cs =================================================================== diff -u -r777f0be3848511440999cbd54143ea38e04043ef -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingCalculationTest.cs (.../PipingCalculationTest.cs) (revision 777f0be3848511440999cbd54143ea38e04043ef) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingCalculationTest.cs (.../PipingCalculationTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -1,4 +1,6 @@ -using Core.Common.Base; +using System; + +using Core.Common.Base; using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Piping.Calculation.TestUtil; @@ -16,10 +18,13 @@ } [Test] - public void DefaultConstructor_DefaultPropertyValuesAreSet() + public void Constructor_DefaultPropertyValuesAreSet() { + // Setup + var generalInputParameters = new GeneralPipingInput(); + // Call - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(generalInputParameters); // Assert Assert.IsInstanceOf(calculation); @@ -34,6 +39,16 @@ } [Test] + public void Constructor_GeneralPipingInputIsNull_ThrowArgumentNullException() + { + // Call + TestDelegate call = () => new PipingCalculation(null); + + // Assert + Assert.Throws(call); + } + + [Test] public void Notify_SingleListenerAttached_ListenerIsNotified() { // Setup @@ -42,7 +57,7 @@ mockRepository.ReplayAll(); - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); calculation.Attach(observer); @@ -58,7 +73,7 @@ observer.Expect(o => o.UpdateObserver()).Repeat.Never(); mockRepository.ReplayAll(); - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); calculation.Attach(observer); calculation.Detach(observer); @@ -79,7 +94,7 @@ mockRepository.ReplayAll(); - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); calculation.Attach(observerA); calculation.Attach(observerB); @@ -100,7 +115,7 @@ mockRepository.ReplayAll(); - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); calculation.Attach(observerA); calculation.Attach(observerB); @@ -116,7 +131,7 @@ // Setup var observer = mockRepository.StrictMock(); - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); // Call & Assert calculation.Detach(observer); @@ -126,7 +141,7 @@ public void ClearOutput_Always_SetsOutputToNull() { // Setup - var data = new PipingCalculation + var data = new PipingCalculation(new GeneralPipingInput()) { Output = new TestPipingOutput() }; @@ -142,7 +157,7 @@ public void HasOutput_OutputNull_ReturnsFalse() { // Setup - var data = new PipingCalculation + var data = new PipingCalculation(new GeneralPipingInput()) { Output = null }; @@ -155,7 +170,7 @@ public void HasOutput_OutputSet_ReturnsTrue() { // Setup - var data = new PipingCalculation + var data = new PipingCalculation(new GeneralPipingInput()) { Output = new TestPipingOutput() }; Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingFailureMechanismTest.cs =================================================================== diff -u -r67fc75b9da1684eb22a425825f63354146f908f5 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingFailureMechanismTest.cs (.../PipingFailureMechanismTest.cs) (revision 67fc75b9da1684eb22a425825f63354146f908f5) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingFailureMechanismTest.cs (.../PipingFailureMechanismTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -137,7 +137,7 @@ public void Calculations_AddPipingCalculation_ItemIsAddedToCollection() { // Setup - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var failureMechanism = new PipingFailureMechanism(); @@ -152,7 +152,7 @@ public void Calculations_RemovePipingCalculation_ItemIsRemovedFromCollection() { // Setup - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var failureMechanism = new PipingFailureMechanism(); failureMechanism.CalculationsGroup.Children.Add(calculation); Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs =================================================================== diff -u -r0c2ba533bc2cf8f4693c468e07f73737e2cc6644 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision 0c2ba533bc2cf8f4693c468e07f73737e2cc6644) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingInputTest.cs (.../PipingInputTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -13,10 +13,13 @@ public class PipingInputTest { [Test] - public void DefaultConstructor_ExpectedValues() + public void Constructor_ExpectedValues() { + // Setup + var generalInputParameters = new GeneralPipingInput(); + // Call - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(generalInputParameters); // Assert Assert.IsInstanceOf(inputParameters); @@ -43,17 +46,17 @@ Assert.IsNull(inputParameters.SoilProfile); Assert.IsNull(inputParameters.HydraulicBoundaryLocation); - Assert.AreEqual(1.0, inputParameters.UpliftModelFactor); - Assert.AreEqual(1, inputParameters.SellmeijerModelFactor); - Assert.AreEqual(0.3, inputParameters.CriticalHeaveGradient); - Assert.AreEqual(0.3, inputParameters.SellmeijerReductionFactor); - Assert.AreEqual(9.81, inputParameters.Gravity); - Assert.AreEqual(1.33e-6, inputParameters.WaterKinematicViscosity); - Assert.AreEqual(10.0, inputParameters.WaterVolumetricWeight); - Assert.AreEqual(16.5, inputParameters.SandParticlesVolumicWeight); - Assert.AreEqual(0.25, inputParameters.WhitesDragCoefficient); - Assert.AreEqual(37, inputParameters.BeddingAngle); - Assert.AreEqual(2.08e-4, inputParameters.MeanDiameter70); + 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); Assert.IsInstanceOf(inputParameters.ThicknessCoverageLayer); Assert.IsNaN(inputParameters.ThicknessCoverageLayer.Mean); @@ -72,10 +75,22 @@ } [Test] + public void Constructor_GeneralPipingInputIsNull_ArgumentNullException() + { + // Setup + + // Call + TestDelegate call = () => new PipingInput(null); + + // Assert + Assert.Throws(call); + } + + [Test] public void AssessmentLevel_ValueIsNaN_ThrowsArgumentException() { // Setup - var pipingInput = new PipingInput(); + var pipingInput = new PipingInput(new GeneralPipingInput()); // Call TestDelegate test = () => pipingInput.AssessmentLevel = double.NaN; @@ -91,7 +106,7 @@ public void ExitPointL_ValueLessOrEqualToZero_ThrowsArgumentOutOfRangeException(double value) { // Setup - var pipingInput = new PipingInput(); + var pipingInput = new PipingInput(new GeneralPipingInput()); // Call TestDelegate test = () => pipingInput.ExitPointL = value; Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingCalculationFactory.cs =================================================================== diff -u -r9eb91cfa000697ddfdeace89aa8f1e959fc1f7f9 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingCalculationFactory.cs (.../PipingCalculationFactory.cs) (revision 9eb91cfa000697ddfdeace89aa8f1e959fc1f7f9) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil/PipingCalculationFactory.cs (.../PipingCalculationFactory.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -7,7 +7,7 @@ { public static PipingCalculation CreateCalculationWithInvalidData() { - return new PipingCalculation(); + return new PipingCalculation(new GeneralPipingInput()); } public static PipingCalculation CreateCalculationWithValidInput() @@ -28,12 +28,11 @@ new Point3D(0.0, 0.0, 0.0), new Point3D(1.0, 0.0, top) }); - return new PipingCalculation + return new PipingCalculation(new GeneralPipingInput()) { InputParameters = { AssessmentLevel = 1.0, - BeddingAngle = 1.0, DampingFactorExit = { Mean = 1.0 @@ -47,21 +46,16 @@ Mean = 1.0 }, ExitPointL = 1.0, - Gravity = 1.0, - MeanDiameter70 = 1.0, PiezometricHeadExit = 1.0, PiezometricHeadPolder = 1.0, PhreaticLevelExit = { Mean = 2.0 }, - SandParticlesVolumicWeight = 1.0, SeepageLength = { Mean = 1.0 }, - SellmeijerModelFactor = 1.0, - SellmeijerReductionFactor = 1.0, ThicknessAquiferLayer = { Mean = 1.0 @@ -70,10 +64,6 @@ { Mean = 1.0 }, - UpliftModelFactor = 1.0, - WaterKinematicViscosity = 1.0, - WaterVolumetricWeight = 1.0, - WhitesDragCoefficient = 1.0, SurfaceLine = surfaceLine, SoilProfile = soilProfile } Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Extensions/PipingInputExtensionsTest.cs =================================================================== diff -u -r0c2ba533bc2cf8f4693c468e07f73737e2cc6644 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Extensions/PipingInputExtensionsTest.cs (.../PipingInputExtensionsTest.cs) (revision 0c2ba533bc2cf8f4693c468e07f73737e2cc6644) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Extensions/PipingInputExtensionsTest.cs (.../PipingInputExtensionsTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -15,7 +15,7 @@ public void SetSurfaceLine_WithDikeToeDikeSideAndDikeToeRiverSide_SetsExitPointLAndSeePageLength() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); RingtoetsPipingSurfaceLine surfaceLine = new RingtoetsPipingSurfaceLine(); var firstPointX = 1.0; var secondPointX = 4.0; @@ -41,7 +41,7 @@ public void SetSurfaceLine_Null_SetsExitPointLAndSeePageLengthMeanToNaN() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); RingtoetsPipingSurfaceLine surfaceLine = new RingtoetsPipingSurfaceLine(); var firstPointX = 1.0; var secondPointX = 4.0; @@ -69,7 +69,7 @@ public void SetSurfaceLine_WithoutDikeToeDikeSideAndDikeToeRiverSide_ExitPointAtEndAndSeePageLengthIsLengthInX() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); RingtoetsPipingSurfaceLine surfaceLine = new RingtoetsPipingSurfaceLine(); var firstPointX = 1.0; var secondPointX = 4.0; @@ -93,7 +93,7 @@ public void SetSurfaceLine_WithoutDikeToeDikeSide_ExitPointSetSeePageLengthStartToExitPointInX() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); RingtoetsPipingSurfaceLine surfaceLine = new RingtoetsPipingSurfaceLine(); var firstPointX = 1.0; var secondPointX = 3.0; @@ -122,7 +122,7 @@ public void SetSurfaceLine_WithoutDikeToeRiverSide_ExitPointAtEndSeePageLengthLessThanLengthInX() { // Setup - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); RingtoetsPipingSurfaceLine surfaceLine = new RingtoetsPipingSurfaceLine(); var firstPointX = 1.0; var secondPointX = 3.0; @@ -167,7 +167,7 @@ IsAquifer = true } }); - var input = new PipingInput + var input = new PipingInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, SoilProfile = soilProfile, @@ -191,7 +191,7 @@ { // Setup var surfaceLine = ValidSurfaceLine(0.0, 4.0); - var input = new PipingInput(); + var input = new PipingInput(new GeneralPipingInput()); input.SetSurfaceLine(surfaceLine); input.SeepageLength.Mean = seepageLength; // L-coordinate of entry point at 4.0 - seepageLength @@ -211,7 +211,7 @@ var surfaceLine = ValidSurfaceLine(0.0, 4.0); var l = 2.0; - var input = new PipingInput + var input = new PipingInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, ExitPointL = l @@ -232,7 +232,7 @@ var exitPointOld = 4.0; var seepageLength = 3.0; var surfaceLine = ValidSurfaceLine(0.0, exitPointOld); - var input = new PipingInput(); + var input = new PipingInput(new GeneralPipingInput()); input.SetSurfaceLine(surfaceLine); input.SeepageLength.Mean = seepageLength; var entryPointL = exitPointOld - seepageLength; @@ -271,7 +271,7 @@ IsAquifer = false } }); - var input = new PipingInput(); + var input = new PipingInput(new GeneralPipingInput()); // Call Action call = null; @@ -306,8 +306,10 @@ IsAquifer = false } }); - var input = new PipingInput(); - input.SoilProfile = soilProfile; + var input = new PipingInput(new GeneralPipingInput()) + { + SoilProfile = soilProfile + }; // Call Action call = () => input.SetSurfaceLine(surfaceLine); @@ -340,7 +342,7 @@ IsAquifer = false } }); - var input = new PipingInput(); + var input = new PipingInput(new GeneralPipingInput()); input.SetSurfaceLine(surfaceLine); input.SetSoilProfile(soilProfile); @@ -378,7 +380,7 @@ } }); - var input = new PipingInput(); + var input = new PipingInput(new GeneralPipingInput()); input.SetSurfaceLine(surfaceLine); input.SetExitPointL(0.5); @@ -415,7 +417,7 @@ IsAquifer = false } }); - var input = new PipingInput + var input = new PipingInput(new GeneralPipingInput()) { SoilProfile = soilProfile, ExitPointL = 0.5 @@ -455,7 +457,7 @@ IsAquifer = false } }); - var input = new PipingInput + var input = new PipingInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, ExitPointL = 0.5 @@ -495,7 +497,7 @@ IsAquifer = false } }); - var input = new PipingInput + var input = new PipingInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, SoilProfile = soilProfile Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingCalculationContextTest.cs =================================================================== diff -u -r7faedeb6692adf7a28c07c695c8c3de5b470ebd8 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingCalculationContextTest.cs (.../PipingCalculationContextTest.cs) (revision 7faedeb6692adf7a28c07c695c8c3de5b470ebd8) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingCalculationContextTest.cs (.../PipingCalculationContextTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -27,7 +27,7 @@ { new TestPipingSoilProfile() }; - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var mocks = new MockRepository(); var pipingFailureMechanismMock = mocks.StrictMock(); @@ -59,7 +59,7 @@ { new TestPipingSoilProfile() }; - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var mocks = new MockRepository(); var assessmentSection = mocks.StrictMock(); mocks.ReplayAll(); @@ -83,7 +83,7 @@ { new TestPipingSoilProfile() }; - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var mocks = new MockRepository(); var pipingFailureMechanismMock = mocks.StrictMock(); mocks.ReplayAll(); @@ -111,7 +111,7 @@ { new TestPipingSoilProfile() }; - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var pipingFailureMechanismMock = mocks.StrictMock(); var assessmentSectionBaseMock = mocks.StrictMock(); @@ -142,7 +142,7 @@ { new TestPipingSoilProfile() }; - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var pipingFailureMechanismMock = mocks.StrictMock(); var assessmentSectionBaseMock = mocks.StrictMock(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingInputContextTest.cs =================================================================== diff -u -r7faedeb6692adf7a28c07c695c8c3de5b470ebd8 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingInputContextTest.cs (.../PipingInputContextTest.cs) (revision 7faedeb6692adf7a28c07c695c8c3de5b470ebd8) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PresentationObjects/PipingInputContextTest.cs (.../PipingInputContextTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -20,7 +20,7 @@ public void ParameteredConstructor_ExpectedValues() { // Setup - var pipingInput = new PipingInput(); + var pipingInput = new PipingInput(new GeneralPipingInput()); var surfaceLines = new[] { new RingtoetsPipingSurfaceLine() }; var profiles = new[] { new TestPipingSoilProfile() }; @@ -46,7 +46,7 @@ public void ParameteredConstructor_AssessmentSectionIsNull_ThrowArgumentNullException() { // Setup - var input = new PipingInput(); + var input = new PipingInput(new GeneralPipingInput()); var surfaceLines = new[] { new RingtoetsPipingSurfaceLine() @@ -73,7 +73,7 @@ observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); - var presentationObject = new PipingInputContext(new PipingInput(), + var presentationObject = new PipingInputContext(new PipingInput(new GeneralPipingInput()), Enumerable.Empty(), Enumerable.Empty(), assessmentSectionMock); @@ -95,7 +95,7 @@ var observer = mocks.StrictMock(); mocks.ReplayAll(); - var presentationObject = new PipingInputContext(new PipingInput(), + var presentationObject = new PipingInputContext(new PipingInput(new GeneralPipingInput()), Enumerable.Empty(), Enumerable.Empty(), assessmentSectionMock); @@ -119,7 +119,7 @@ observer.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); - var pipingInput = new PipingInput(); + var pipingInput = new PipingInput(new GeneralPipingInput()); var presentationObject = new PipingInputContext(pipingInput, Enumerable.Empty(), Enumerable.Empty(), Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/GeneralPipingInputPropertiesTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/GeneralPipingInputPropertiesTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/GeneralPipingInputPropertiesTest.cs (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -0,0 +1,55 @@ +using Core.Common.Gui.PropertyBag; + +using NUnit.Framework; + +using Ringtoets.Piping.Data; +using Ringtoets.Piping.Forms.PropertyClasses; + +namespace Ringtoets.Piping.Forms.Test.PropertyClasses +{ + [TestFixture] + public class GeneralPipingInputPropertiesTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + + // Call + var properties = new GeneralPipingInputProperties(); + + // Assert + Assert.IsInstanceOf>(properties); + } + + [Test] + public void Data_SetNewGeneralPipingInputInstance_ReturnCorrectPropertyValues() + { + // Setup + var inputParameters = new GeneralPipingInput(); + var properties = new GeneralPipingInputProperties(); + + // Call + properties.Data = inputParameters; + + // Assert + Assert.AreEqual(inputParameters.UpliftModelFactor, properties.UpliftModelFactor); + Assert.AreEqual(inputParameters.SellmeijerModelFactor, properties.SellmeijerModelFactor); + + Assert.AreEqual(inputParameters.WaterVolumetricWeight, properties.WaterVolumetricWeight); + + Assert.AreEqual(inputParameters.CriticalHeaveGradient, properties.CriticalHeaveGradient); + + Assert.AreEqual(inputParameters.SandParticlesVolumicWeight, properties.SandParticlesVolumicWeight); + Assert.AreEqual(inputParameters.WhitesDragCoefficient, properties.WhitesDragCoefficient); + Assert.AreEqual(inputParameters.BeddingAngle, properties.BeddingAngle); + Assert.AreEqual(inputParameters.WaterKinematicViscosity, properties.WaterKinematicViscosity); + Assert.AreEqual(inputParameters.Gravity, properties.Gravity); + Assert.AreEqual(inputParameters.MeanDiameter70, properties.MeanDiameter70); + Assert.AreEqual(inputParameters.SellmeijerReductionFactor, properties.SellmeijerReductionFactor); + + Assert.AreEqual(inputParameters.A, properties.A); + Assert.AreEqual(inputParameters.B, properties.B); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationContextPropertiesTest.cs =================================================================== diff -u -r7318825b6005fa3a0050a906371604f54e0b19df -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationContextPropertiesTest.cs (.../PipingCalculationContextPropertiesTest.cs) (revision 7318825b6005fa3a0050a906371604f54e0b19df) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationContextPropertiesTest.cs (.../PipingCalculationContextPropertiesTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -31,7 +31,7 @@ { // Setup const string name = ""; - var calculation = new PipingCalculation + var calculation = new PipingCalculation(new GeneralPipingInput()) { Name = name }; @@ -65,7 +65,7 @@ var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); calculation.Attach(projectObserver); var properties = new PipingCalculationContextProperties @@ -96,7 +96,7 @@ var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); calculation.Attach(projectObserver); var properties = new PipingCalculationContextProperties Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs =================================================================== diff -u -r0c2ba533bc2cf8f4693c468e07f73737e2cc6644 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 0c2ba533bc2cf8f4693c468e07f73737e2cc6644) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingInputContextPropertiesTest.cs (.../PipingInputContextPropertiesTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -52,7 +52,7 @@ }); var testHydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(0.0); - var inputParameters = new PipingInput + var inputParameters = new PipingInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine, SoilProfile = soilProfile, @@ -79,26 +79,13 @@ Assert.AreSame(inputParameters.DarcyPermeability, properties.DarcyPermeability.Distribution); Assert.AreSame(inputParameters.ThicknessAquiferLayer, properties.ThicknessAquiferLayer.Distribution); - Assert.AreEqual(inputParameters.UpliftModelFactor, properties.UpliftModelFactor); Assert.AreEqual(inputParameters.PiezometricHeadExit, properties.PiezometricHeadExitHeave); Assert.AreEqual(inputParameters.PiezometricHeadExit, properties.PiezometricHeadExitUplift); Assert.AreEqual(inputParameters.PiezometricHeadPolder, properties.PiezometricHeadPolderHeave); Assert.AreEqual(inputParameters.PiezometricHeadPolder, properties.PiezometricHeadPolderUplift); Assert.AreEqual(inputParameters.AssessmentLevel, properties.AssessmentLevelSellmeijer); Assert.AreEqual(inputParameters.AssessmentLevel, properties.AssessmentLevelUplift); - Assert.AreEqual(inputParameters.SellmeijerModelFactor, properties.SellmeijerModelFactor); - Assert.AreEqual(inputParameters.CriticalHeaveGradient, properties.CriticalHeaveGradient); - Assert.AreEqual(inputParameters.SellmeijerReductionFactor, properties.SellmeijerReductionFactor); - Assert.AreEqual(inputParameters.Gravity, properties.Gravity); - Assert.AreEqual(inputParameters.WaterKinematicViscosity, properties.WaterKinematicViscosity); - Assert.AreEqual(inputParameters.WaterVolumetricWeight, properties.WaterVolumetricWeightSellmeijer); - Assert.AreEqual(inputParameters.WaterVolumetricWeight, properties.WaterVolumetricWeightUplift); - Assert.AreEqual(inputParameters.SandParticlesVolumicWeight, properties.SandParticlesVolumicWeight); - Assert.AreEqual(inputParameters.WhitesDragCoefficient, properties.WhitesDragCoefficient); - Assert.AreEqual(inputParameters.BeddingAngle, properties.BeddingAngle); - Assert.AreEqual(inputParameters.MeanDiameter70, properties.MeanDiameter70); - Assert.AreSame(inputParameters.SeepageLength, properties.SeepageLength.Distribution); Assert.AreEqual(inputParameters.SeepageLength.Mean, properties.ExitPointL - properties.EntryPointL); Assert.AreEqual(inputParameters.ExitPointL, properties.ExitPointL); @@ -120,7 +107,7 @@ projectObserver.Expect(o => o.UpdateObserver()); mocks.ReplayAll(); - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); inputParameters.Attach(projectObserver); var properties = new PipingInputContextProperties @@ -145,28 +132,18 @@ var mocks = new MockRepository(); var assessmentSectionMock = mocks.StrictMock(); var projectObserver = mocks.StrictMock(); - int numberProperties = 22; + int numberProperties = 12; projectObserver.Expect(o => o.UpdateObserver()).Repeat.Times(numberProperties); mocks.ReplayAll(); - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); inputParameters.Attach(projectObserver); Random random = new Random(22); double assessmentLevel = random.NextDouble(); - double waterVolumetricWeight = random.NextDouble(); - double upliftModelFactor = random.NextDouble(); double piezometricHeadExit = random.NextDouble(); double piezometricHeadPolder = random.NextDouble(); - double sellmeijerModelFactor = random.NextDouble(); - double sellmeijerReductionFactor = random.NextDouble(); - double sandParticlesVolumicWeight = random.NextDouble(); - double whitesDragCoefficient = random.NextDouble(); - double waterKinematicViscosity = random.NextDouble(); - double gravity = random.NextDouble(); - double meanDiameter70 = random.NextDouble(); - double beddingAngle = random.NextDouble(); var dampingFactorExit = new LognormalDistribution(); var phreaticLevelExit = new NormalDistribution(); @@ -187,50 +164,31 @@ Enumerable.Empty(), assessmentSectionMock), AssessmentLevelSellmeijer = assessmentLevel, - WaterVolumetricWeightUplift = waterVolumetricWeight, - UpliftModelFactor = upliftModelFactor, PiezometricHeadExitUplift = piezometricHeadExit, DampingFactorExitHeave = new LognormalDistributionDesignVariable(dampingFactorExit), PhreaticLevelExitHeave = new NormalDistributionDesignVariable(phreaticLevelExit), PiezometricHeadPolderHeave = piezometricHeadPolder, ThicknessCoverageLayerSellmeijer = new LognormalDistributionDesignVariable(thicknessCoverageLayer), - SellmeijerModelFactor = sellmeijerModelFactor, - SellmeijerReductionFactor = sellmeijerReductionFactor, SeepageLength = new LognormalDistributionDesignVariable(seepageLength), - SandParticlesVolumicWeight = sandParticlesVolumicWeight, - WhitesDragCoefficient = whitesDragCoefficient, Diameter70 = new LognormalDistributionDesignVariable(diameter70), DarcyPermeability = new LognormalDistributionDesignVariable(darcyPermeability), - WaterKinematicViscosity = waterKinematicViscosity, - Gravity = gravity, ThicknessAquiferLayer = new LognormalDistributionDesignVariable(thicknessAquiferLayer), - MeanDiameter70 = meanDiameter70, - BeddingAngle = beddingAngle, SurfaceLine = surfaceLine, SoilProfile = soilProfile }; - // Assert I + // Assert Assert.AreEqual(assessmentLevel, inputParameters.AssessmentLevel); - Assert.AreEqual(waterVolumetricWeight, inputParameters.WaterVolumetricWeight); - Assert.AreEqual(upliftModelFactor, inputParameters.UpliftModelFactor); Assert.AreEqual(piezometricHeadExit, inputParameters.PiezometricHeadExit); Assert.AreEqual(dampingFactorExit, inputParameters.DampingFactorExit); Assert.AreEqual(phreaticLevelExit, inputParameters.PhreaticLevelExit); Assert.AreEqual(piezometricHeadPolder, inputParameters.PiezometricHeadPolder); Assert.AreEqual(thicknessCoverageLayer, inputParameters.ThicknessCoverageLayer); - Assert.AreEqual(sellmeijerModelFactor, inputParameters.SellmeijerModelFactor); - Assert.AreEqual(sellmeijerReductionFactor, inputParameters.SellmeijerReductionFactor); Assert.AreEqual(seepageLength, inputParameters.SeepageLength); - Assert.AreEqual(sandParticlesVolumicWeight, inputParameters.SandParticlesVolumicWeight); - Assert.AreEqual(whitesDragCoefficient, inputParameters.WhitesDragCoefficient); Assert.AreEqual(diameter70, inputParameters.Diameter70); Assert.AreEqual(darcyPermeability, inputParameters.DarcyPermeability); - Assert.AreEqual(waterKinematicViscosity, inputParameters.WaterKinematicViscosity); - Assert.AreEqual(gravity, inputParameters.Gravity); Assert.AreEqual(thicknessAquiferLayer, inputParameters.ThicknessAquiferLayer); - Assert.AreEqual(meanDiameter70, inputParameters.MeanDiameter70); - Assert.AreEqual(beddingAngle, inputParameters.BeddingAngle); + Assert.AreEqual(surfaceLine, inputParameters.SurfaceLine); Assert.AreEqual(soilProfile, inputParameters.SoilProfile); mocks.VerifyAll(); @@ -252,7 +210,7 @@ mocks.ReplayAll(); var surfaceLine = ValidSurfaceLine(0.0, 4.0); - var inputParameters = new PipingInput + var inputParameters = new PipingInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine }; @@ -294,7 +252,7 @@ mocks.ReplayAll(); var surfaceLine = ValidSurfaceLine(0.0, 4.0); - var inputParameters = new PipingInput + var inputParameters = new PipingInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine }; @@ -331,7 +289,7 @@ mocks.ReplayAll(); var surfaceLine = ValidSurfaceLine(0.0, 4.0); - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); inputParameters.SetSurfaceLine(surfaceLine); inputParameters.Attach(inputObserver); @@ -364,7 +322,7 @@ mocks.ReplayAll(); var surfaceLine = ValidSurfaceLine(0.0, 4.0); - var inputParameters = new PipingInput + var inputParameters = new PipingInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine }; @@ -402,7 +360,7 @@ mocks.ReplayAll(); var surfaceLine = ValidSurfaceLine(0.0, 4.0); - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); inputParameters.SetSurfaceLine(surfaceLine); var properties = new PipingInputContextProperties @@ -438,7 +396,7 @@ mocks.ReplayAll(); double assessmentLevel = new Random(21).NextDouble(); - var inputParameters = new PipingInput + var inputParameters = new PipingInput(new GeneralPipingInput()) { AssessmentLevel = assessmentLevel }; @@ -481,7 +439,7 @@ projectObserver.Expect(o => o.UpdateObserver()).Repeat.Times(1); mocks.ReplayAll(); - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); inputParameters.Attach(projectObserver); var properties = new PipingInputContextProperties Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj =================================================================== diff -u -r86e717a5477d55d1c4351f2857a1d76e220a3ab4 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision 86e717a5477d55d1c4351f2857a1d76e220a3ab4) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -61,6 +61,7 @@ + Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r7318825b6005fa3a0050a906371604f54e0b19df -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs (.../PipingCalculationContextTreeNodeInfoTest.cs) (revision 7318825b6005fa3a0050a906371604f54e0b19df) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationContextTreeNodeInfoTest.cs (.../PipingCalculationContextTreeNodeInfoTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -54,7 +54,7 @@ { // Setup var testname = "testName"; - var calculation = new PipingCalculation + var calculation = new PipingCalculation(new GeneralPipingInput()) { Name = testname }; @@ -97,7 +97,7 @@ public void EnsureVisibleOnCreate_Always_ReturnsTrue() { // Setup - var calculation = new PipingCalculation + var calculation = new PipingCalculation(new GeneralPipingInput()) { Output = new PipingOutput(0.0, 0.0, 0.0, 0.0, 0.0, 0.0) }; @@ -133,7 +133,7 @@ public void ChildNodeObjects_WithOutputData_ReturnOutputChildNode() { // Setup - var calculation = new PipingCalculation + var calculation = new PipingCalculation(new GeneralPipingInput()) { Output = new PipingOutput(0.0, 0.0, 0.0, 0.0, 0.0, 0.0) }; @@ -176,7 +176,7 @@ var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); - var pipingCalculationContext = new PipingCalculationContext(new PipingCalculation(), + var pipingCalculationContext = new PipingCalculationContext(new PipingCalculation(new GeneralPipingInput()), Enumerable.Empty(), Enumerable.Empty(), pipingFailureMechanismMock, @@ -217,7 +217,7 @@ var observerMock = mocks.StrictMock(); observerMock.Expect(o => o.UpdateObserver()); - var calculation = new PipingCalculation + var calculation = new PipingCalculation(new GeneralPipingInput()) { Name = "" }; @@ -258,7 +258,7 @@ // Setup var gui = mocks.StrictMock(); var treeViewControlMock = mocks.StrictMock(); - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var pipingFailureMechanismMock = mocks.StrictMock(); var assessmentSectionBaseMock = mocks.StrictMock(); var nodeData = new PipingCalculationContext(calculation, @@ -289,7 +289,7 @@ { var gui = mocks.StrictMock(); var treeViewControlMock = mocks.StrictMock(); - var calculation = new PipingCalculation + var calculation = new PipingCalculation(new GeneralPipingInput()) { Output = new TestPipingOutput() }; @@ -327,7 +327,7 @@ var treeViewControlMock = mocks.StrictMock(); var pipingFailureMechanismMock = mocks.StrictMock(); var assessmentSectionBaseMock = mocks.StrictMock(); - var nodeData = new PipingCalculationContext(new PipingCalculation(), + var nodeData = new PipingCalculationContext(new PipingCalculation(new GeneralPipingInput()), Enumerable.Empty(), Enumerable.Empty(), pipingFailureMechanismMock, @@ -368,7 +368,7 @@ public void CanRemove_ParentIsPipingCalculationGroupWithCalculation_ReturnTrue(bool groupNameEditable) { // Setup - var calculationToBeRemoved = new PipingCalculation(); + var calculationToBeRemoved = new PipingCalculation(new GeneralPipingInput()); var group = new PipingCalculationGroup("", groupNameEditable); group.Children.Add(calculationToBeRemoved); @@ -400,7 +400,7 @@ public void CanRemove_ParentIsPipingCalculationGroupWithoutCalculation_ReturnFalse(bool groupNameEditable) { // Setup - var calculationToBeRemoved = new PipingCalculation(); + var calculationToBeRemoved = new PipingCalculation(new GeneralPipingInput()); var group = new PipingCalculationGroup("", groupNameEditable); var pipingFailureMechanismMock = mocks.StrictMock(); @@ -434,7 +434,7 @@ var assessmentSectionBaseMock = mocks.StrictMock(); mocks.ReplayAll(); - var nodeMock = new PipingCalculationContext(new PipingCalculation(), + var nodeMock = new PipingCalculationContext(new PipingCalculation(new GeneralPipingInput()), Enumerable.Empty(), Enumerable.Empty(), pipingFailureMechanismMock, @@ -457,11 +457,11 @@ var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); - var elementToBeRemoved = new PipingCalculation(); + var elementToBeRemoved = new PipingCalculation(new GeneralPipingInput()); var group = new PipingCalculationGroup(); group.Children.Add(elementToBeRemoved); - group.Children.Add(new PipingCalculation()); + group.Children.Add(new PipingCalculation(new GeneralPipingInput())); group.Attach(observer); var pipingFailureMechanismMock = mocks.StrictMock(); @@ -501,7 +501,7 @@ var mainWindow = mocks.DynamicMock(); var observer = mocks.StrictMock(); var treeViewControlMock = mocks.StrictMock(); - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var pipingFailureMechanismMock = mocks.StrictMock(); var assessmentSectionBaseMock = mocks.StrictMock(); var pipingCalculationContext = new PipingCalculationContext(calculation, @@ -560,7 +560,7 @@ var gui = mocks.DynamicMock(); var observer = mocks.StrictMock(); var treeViewControlMock = mocks.StrictMock(); - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var pipingFailureMechanismMock = mocks.StrictMock(); var assessmentSectionBaseMock = mocks.StrictMock(); var pipingCalculationContext = new PipingCalculationContext(calculation, @@ -604,7 +604,7 @@ var observer = mocks.StrictMock(); var treeViewControlMock = mocks.StrictMock(); var calculateContextMenuItemIndex = 1; - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var validPipingInput = new TestPipingInput(); var pipingFailureMechanismMock = mocks.StrictMock(); var assessmentSectionBaseMock = mocks.StrictMock(); @@ -624,26 +624,16 @@ plugin.Gui = gui; calculation.InputParameters.AssessmentLevel = validPipingInput.AssessmentLevel; - calculation.InputParameters.BeddingAngle = validPipingInput.BeddingAngle; calculation.InputParameters.DampingFactorExit.Mean = validPipingInput.DampingFactorExit; calculation.InputParameters.DarcyPermeability.Mean = validPipingInput.DarcyPermeability; calculation.InputParameters.Diameter70.Mean = validPipingInput.Diameter70; calculation.InputParameters.ExitPointL = validPipingInput.ExitPointXCoordinate; - calculation.InputParameters.Gravity = validPipingInput.Gravity; - calculation.InputParameters.MeanDiameter70 = validPipingInput.MeanDiameter70; calculation.InputParameters.PhreaticLevelExit.Mean = validPipingInput.PhreaticLevelExit; calculation.InputParameters.PiezometricHeadExit = validPipingInput.PiezometricHeadExit; calculation.InputParameters.PiezometricHeadPolder = validPipingInput.PiezometricHeadPolder; - calculation.InputParameters.SandParticlesVolumicWeight = validPipingInput.SandParticlesVolumicWeight; calculation.InputParameters.SeepageLength.Mean = validPipingInput.SeepageLength; - calculation.InputParameters.SellmeijerModelFactor = validPipingInput.SellmeijerModelFactor; - calculation.InputParameters.SellmeijerReductionFactor = validPipingInput.SellmeijerReductionFactor; calculation.InputParameters.ThicknessAquiferLayer.Mean = validPipingInput.ThicknessAquiferLayer; calculation.InputParameters.ThicknessCoverageLayer.Mean = validPipingInput.ThicknessCoverageLayer; - calculation.InputParameters.UpliftModelFactor = validPipingInput.UpliftModelFactor; - calculation.InputParameters.WaterVolumetricWeight = validPipingInput.WaterVolumetricWeight; - calculation.InputParameters.WaterKinematicViscosity = validPipingInput.WaterKinematicViscosity; - calculation.InputParameters.WhitesDragCoefficient = validPipingInput.WhitesDragCoefficient; calculation.InputParameters.SurfaceLine = validPipingInput.SurfaceLine; calculation.InputParameters.SoilProfile = validPipingInput.SoilProfile; @@ -687,7 +677,7 @@ var gui = mocks.DynamicMock(); var observer = mocks.StrictMock(); var treeViewControlMock = mocks.StrictMock(); - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); var pipingFailureMechanismMock = mocks.StrictMock(); var assessmentSectionBaseMock = mocks.StrictMock(); var pipingCalculationContext = new PipingCalculationContext(calculation, Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r2b26a2f9062fe2221ffdb670496c80bc36ba0cfb -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision 2b26a2f9062fe2221ffdb670496c80bc36ba0cfb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -144,7 +144,7 @@ // Setup var calculationItem = mocks.StrictMock(); - var childCalculation = new PipingCalculation(); + var childCalculation = new PipingCalculation(new GeneralPipingInput()); var childGroup = new PipingCalculationGroup(); @@ -190,7 +190,7 @@ var group = new PipingCalculationGroup(); parentGroup.Children.Add(group); - group.Children.Add(new PipingCalculation + group.Children.Add(new PipingCalculation(new GeneralPipingInput()) { Output = new TestPipingOutput() }); @@ -308,7 +308,7 @@ var gui = mocks.StrictMock(); var group = new PipingCalculationGroup(); - group.Children.Add(new PipingCalculation + group.Children.Add(new PipingCalculation(new GeneralPipingInput()) { Output = new TestPipingOutput() }); @@ -415,7 +415,7 @@ var gui = mocks.StrictMock(); var group = new PipingCalculationGroup(); - group.Children.Add(new PipingCalculation + group.Children.Add(new PipingCalculation(new GeneralPipingInput()) { Output = new TestPipingOutput() }); @@ -1376,7 +1376,7 @@ switch (type) { case PipingCalculationItemType.Calculation: - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); if (initialName != null) { calculation.Name = initialName; Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs =================================================================== diff -u -r80aeb6fb275f0d7ea3f470bb8ba0ef0fc5caa113 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs (.../PipingFailureMechanismTreeNodeInfoTest.cs) (revision 80aeb6fb275f0d7ea3f470bb8ba0ef0fc5caa113) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs (.../PipingFailureMechanismTreeNodeInfoTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -102,8 +102,9 @@ mocks.ReplayAll(); var pipingFailureMechanism = new PipingFailureMechanism(); - pipingFailureMechanism.CalculationsGroup.Children.Add(new PipingCalculation()); - pipingFailureMechanism.CalculationsGroup.Children.Add(new PipingCalculation()); + var generalInputParameters = new GeneralPipingInput(); + pipingFailureMechanism.CalculationsGroup.Children.Add(new PipingCalculation(generalInputParameters)); + pipingFailureMechanism.CalculationsGroup.Children.Add(new PipingCalculation(generalInputParameters)); var pipingFailureMechanismContext = new PipingFailureMechanismContext(pipingFailureMechanism, assessmentSection); @@ -154,11 +155,12 @@ var gui = mocks.StrictMock(); var treeViewControl = mocks.StrictMock(); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); - var pipingCalculation1 = new PipingCalculation + var generalInputParameters = new GeneralPipingInput(); + var pipingCalculation1 = new PipingCalculation(generalInputParameters) { Output = new TestPipingOutput() }; - var pipingCalculation2 = new PipingCalculation + var pipingCalculation2 = new PipingCalculation(generalInputParameters) { Output = new TestPipingOutput() }; @@ -316,7 +318,7 @@ // Setup var treeViewControl = mocks.StrictMock(); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); - var pipingCalculation = new PipingCalculation + var pipingCalculation = new PipingCalculation(new GeneralPipingInput()) { Output = new TestPipingOutput() }; @@ -432,7 +434,7 @@ var failureMechanism = new PipingFailureMechanism(); failureMechanism.CalculationsGroup.Children.Clear(); - failureMechanism.CalculationsGroup.Children.Add(new PipingCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new PipingCalculation(new GeneralPipingInput())); var assessmentSection = mocks.Stub(); var failureMechanismContext = new PipingFailureMechanismContext(failureMechanism, assessmentSection); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingInputContextTreeNodeInfoTest.cs =================================================================== diff -u -rd4dfa2c6c715426bf899c52cb268a9d7a2ef068a -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingInputContextTreeNodeInfoTest.cs (.../PipingInputContextTreeNodeInfoTest.cs) (revision d4dfa2c6c715426bf899c52cb268a9d7a2ef068a) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingInputContextTreeNodeInfoTest.cs (.../PipingInputContextTreeNodeInfoTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -54,7 +54,7 @@ { // Setup var assessmentSection = mocks.StrictMock(); - var pipingInputContext = mocks.StrictMock(new PipingInput(), Enumerable.Empty(), Enumerable.Empty(), assessmentSection); + var pipingInputContext = mocks.StrictMock(new PipingInput(new GeneralPipingInput()), Enumerable.Empty(), Enumerable.Empty(), assessmentSection); mocks.ReplayAll(); @@ -72,7 +72,7 @@ { // Setup var assessmentSection = mocks.StrictMock(); - var pipingInputContext = mocks.StrictMock(new PipingInput(), Enumerable.Empty(), Enumerable.Empty(), assessmentSection); + var pipingInputContext = mocks.StrictMock(new PipingInput(new GeneralPipingInput()), Enumerable.Empty(), Enumerable.Empty(), assessmentSection); mocks.ReplayAll(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/LognormalDistributionDesignVariableTypeConverterTest.cs =================================================================== diff -u -rd4dfa2c6c715426bf899c52cb268a9d7a2ef068a -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/LognormalDistributionDesignVariableTypeConverterTest.cs (.../LognormalDistributionDesignVariableTypeConverterTest.cs) (revision d4dfa2c6c715426bf899c52cb268a9d7a2ef068a) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/LognormalDistributionDesignVariableTypeConverterTest.cs (.../LognormalDistributionDesignVariableTypeConverterTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -138,7 +138,7 @@ var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); var inputParametersContext = new PipingInputContext(inputParameters, Enumerable.Empty(), Enumerable.Empty(), Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/NormalDistributionDesignVariableTypeConverterTest.cs =================================================================== diff -u -rd4dfa2c6c715426bf899c52cb268a9d7a2ef068a -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/NormalDistributionDesignVariableTypeConverterTest.cs (.../NormalDistributionDesignVariableTypeConverterTest.cs) (revision d4dfa2c6c715426bf899c52cb268a9d7a2ef068a) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/NormalDistributionDesignVariableTypeConverterTest.cs (.../NormalDistributionDesignVariableTypeConverterTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -137,7 +137,7 @@ var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); - var inputParameters = new PipingInput(); + var inputParameters = new PipingInput(new GeneralPipingInput()); var inputParametersContext = new PipingInputContext(inputParameters, Enumerable.Empty(), Enumerable.Empty(), Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextHydraulicBoundaryLocationEditorTest.cs =================================================================== diff -u -r428346aca4810ed68d8778943246f581cb1a4386 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextHydraulicBoundaryLocationEditorTest.cs (.../PipingInputContextHydraulicBoundaryLocationEditorTest.cs) (revision 428346aca4810ed68d8778943246f581cb1a4386) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextHydraulicBoundaryLocationEditorTest.cs (.../PipingInputContextHydraulicBoundaryLocationEditorTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -32,7 +32,7 @@ var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(); hydraulicBoundaryDatabase.Locations.Add(hydraulicBoundaryLocation); - var pipingInput = new PipingInput + var pipingInput = new PipingInput(new GeneralPipingInput()) { HydraulicBoundaryLocation = new TestHydraulicBoundaryLocation() }; @@ -79,7 +79,7 @@ assessmentSectionMock.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(); - var pipingInput = new PipingInput + var pipingInput = new PipingInput(new GeneralPipingInput()) { HydraulicBoundaryLocation = hydraulicBoundaryLocation }; Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSoilProfileSelectionEditorTest.cs =================================================================== diff -u -rd4dfa2c6c715426bf899c52cb268a9d7a2ef068a -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSoilProfileSelectionEditorTest.cs (.../PipingInputContextSoilProfileSelectionEditorTest.cs) (revision d4dfa2c6c715426bf899c52cb268a9d7a2ef068a) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSoilProfileSelectionEditorTest.cs (.../PipingInputContextSoilProfileSelectionEditorTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -29,7 +29,7 @@ var context = mockRepository.DynamicMock(); var assessmentSectionMock = mockRepository.StrictMock(); - var pipingInput = new PipingInput + var pipingInput = new PipingInput(new GeneralPipingInput()) { SoilProfile = new TestPipingSoilProfile() }; @@ -76,7 +76,7 @@ var assessmentSectionMock = mockRepository.StrictMock(); var soilProfile = new TestPipingSoilProfile(); - var pipingInput = new PipingInput + var pipingInput = new PipingInput(new GeneralPipingInput()) { SoilProfile = soilProfile }; Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSurfaceLineSelectionEditorTest.cs =================================================================== diff -u -rd4dfa2c6c715426bf899c52cb268a9d7a2ef068a -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSurfaceLineSelectionEditorTest.cs (.../PipingInputContextSurfaceLineSelectionEditorTest.cs) (revision d4dfa2c6c715426bf899c52cb268a9d7a2ef068a) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/UITypeEditors/PipingInputContextSurfaceLineSelectionEditorTest.cs (.../PipingInputContextSurfaceLineSelectionEditorTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -27,7 +27,7 @@ var context = mockRepository.DynamicMock(); var assessmentSectionMock = mockRepository.StrictMock(); - var pipingInput = new PipingInput + var pipingInput = new PipingInput(new GeneralPipingInput()) { SurfaceLine = ValidSurfaceLine() }; @@ -79,7 +79,7 @@ new Point3D(0.0, 0.0, 0.0), new Point3D(1.0, 0.0, 1.0) }); - var pipingInput = new PipingInput + var pipingInput = new PipingInput(new GeneralPipingInput()) { SurfaceLine = surfaceLine }; Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs =================================================================== diff -u -r86e717a5477d55d1c4351f2857a1d76e220a3ab4 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs (.../PipingGuiPluginTest.cs) (revision 86e717a5477d55d1c4351f2857a1d76e220a3ab4) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs (.../PipingGuiPluginTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -9,6 +9,8 @@ using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; + +using Ringtoets.Common.Data; using Ringtoets.Piping.Data; using Ringtoets.Piping.Forms.PresentationObjects; using Ringtoets.Piping.Forms.PropertyClasses; @@ -59,11 +61,23 @@ using (var guiPlugin = new PipingGuiPlugin()) { // call + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + PropertyInfo[] propertyInfos = guiPlugin.GetPropertyInfos().ToArray(); // assert - Assert.AreEqual(6, propertyInfos.Length); + Assert.AreEqual(7, propertyInfos.Length); + var pipingFailureMechanism = new PipingFailureMechanism(); + var pipingFailureMechanismContext = new PipingFailureMechanismContext(pipingFailureMechanism, assessmentSection); + var pipingFailureMechanismContextProperties = propertyInfos.Single(pi => pi.DataType == typeof(PipingFailureMechanismContext)); + Assert.AreEqual(typeof(GeneralPipingInputProperties), pipingFailureMechanismContextProperties.PropertyObjectType); + Assert.IsNull(pipingFailureMechanismContextProperties.AdditionalDataCheck); + Assert.AreSame(pipingFailureMechanism.GeneralInput, pipingFailureMechanismContextProperties.GetObjectPropertiesData(pipingFailureMechanismContext)); + Assert.IsNull(pipingFailureMechanismContextProperties.AfterCreate); + var pipingCalculationContextProperties = propertyInfos.Single(pi => pi.DataType == typeof(PipingCalculationContext)); Assert.AreEqual(typeof(PipingCalculationContextProperties), pipingCalculationContextProperties.PropertyObjectType); Assert.IsNull(pipingCalculationContextProperties.AdditionalDataCheck); @@ -99,6 +113,8 @@ Assert.IsNull(pipingSoilProfileProperties.AdditionalDataCheck); Assert.IsNull(pipingSoilProfileProperties.GetObjectPropertiesData); Assert.IsNull(pipingSoilProfileProperties.AfterCreate); + + mocks.VerifyAll(); } } Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationActivityTest.cs =================================================================== diff -u -r3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4 -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationActivityTest.cs (.../PipingCalculationActivityTest.cs) (revision 3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4) +++ Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationActivityTest.cs (.../PipingCalculationActivityTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -20,7 +20,7 @@ public void ParameteredConstructor_ExpectedValues() { // Setup - var calculation = new PipingCalculation(); + var calculation = new PipingCalculation(new GeneralPipingInput()); // Call var activity = new PipingCalculationActivity(calculation); Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs =================================================================== diff -u -r847f6b97f0a6e007a89364ad12d0541bc0d84d1e -r1c01ea681887e96b5b80fb7d23680a4eeac9bd50 --- Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs (.../PipingCalculationServiceTest.cs) (revision 847f6b97f0a6e007a89364ad12d0541bc0d84d1e) +++ Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationServiceTest.cs (.../PipingCalculationServiceTest.cs) (revision 1c01ea681887e96b5b80fb7d23680a4eeac9bd50) @@ -55,8 +55,17 @@ { // Setup PipingCalculation invalidPipingCalculation = PipingCalculationFactory.CreateCalculationWithValidInput(); - invalidPipingCalculation.InputParameters.BeddingAngle = -1; + // Make invalid by having surfaceline partially above soil profile: + double highestLevelSurfaceLine = invalidPipingCalculation.InputParameters.SurfaceLine.Points.Max(p => p.Z); + invalidPipingCalculation.InputParameters.SoilProfile = new PipingSoilProfile("A", 0, new[] + { + new PipingSoilLayer(highestLevelSurfaceLine-0.5) + { + IsAquifer = true + } + }); + // Call Action call = () => PipingCalculationService.Calculate(invalidPipingCalculation); @@ -75,9 +84,11 @@ public void CalculateThicknessCoverageLayer_ValidInput_ReturnsThickness() { // Setup - PipingInput input = new PipingInput(); - input.ExitPointL = 10; - input.SurfaceLine = new RingtoetsPipingSurfaceLine(); + PipingInput input = new PipingInput(new GeneralPipingInput()) + { + ExitPointL = 10, + SurfaceLine = new RingtoetsPipingSurfaceLine() + }; input.SurfaceLine.SetGeometry(new [] { new Point3D(0, 0, 10), @@ -106,9 +117,11 @@ public void CalculateThicknessCoverageLayer_SurfaceLineOutsideProfile_ThrowsPipingCalculatorException() { // Setup - PipingInput input = new PipingInput(); - input.ExitPointL = 10; - input.SurfaceLine = new RingtoetsPipingSurfaceLine(); + PipingInput input = new PipingInput(new GeneralPipingInput()) + { + ExitPointL = 10, + SurfaceLine = new RingtoetsPipingSurfaceLine() + }; input.SurfaceLine.SetGeometry(new[] { new Point3D(0, 0, 10),