Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsInput.cs =================================================================== diff -u -r9104cbc6b00869ebe468a2ec4462332094ce31d8 -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsInput.cs (.../MacroStabilityInwardsInput.cs) (revision 9104cbc6b00869ebe468a2ec4462332094ce31d8) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsInput.cs (.../MacroStabilityInwardsInput.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -41,22 +41,16 @@ private RoundedDouble slipPlaneMinimumLength; private RoundedDouble maximumSliceWidth; private RoundedDouble waterLevelRiverAverage; - private RoundedDouble waterLevelPolder; private RoundedDouble xCoordinateDrainageConstruction; private RoundedDouble zCoordinateDrainageConstruction; private RoundedDouble minimumLevelPhreaticLineAtDikeTopRiver; private RoundedDouble minimumLevelPhreaticLineAtDikeTopPolder; - private RoundedDouble phreaticLineOffsetBelowDikeTopAtRiver; - private RoundedDouble phreaticLineOffsetBelowDikeTopAtPolder; - private RoundedDouble phreaticLineOffsetBelowShoulderBaseInside; - private RoundedDouble phreaticLineOffsetBelowDikeToeAtPolder; private RoundedDouble leakageLengthOutwardsPhreaticLine3; private RoundedDouble leakageLengthInwardsPhreaticLine3; private RoundedDouble leakageLengthOutwardsPhreaticLine4; private RoundedDouble leakageLengthInwardsPhreaticLine4; private RoundedDouble piezometricHeadPhreaticLine2Outwards; private RoundedDouble piezometricHeadPhreaticLine2Inwards; - private RoundedDouble penetrationLength; private RoundedDouble tangentLineZTop; private RoundedDouble tangentLineZBottom; private MacroStabilityInwardsSurfaceLine surfaceLine; @@ -78,21 +72,16 @@ DikeSoilScenario = MacroStabilityInwardsDikeSoilScenario.ClayDikeOnClay; waterLevelRiverAverage = new RoundedDouble(2, double.NaN); - waterLevelPolder = new RoundedDouble(2, double.NaN); xCoordinateDrainageConstruction = new RoundedDouble(2, double.NaN); zCoordinateDrainageConstruction = new RoundedDouble(2, double.NaN); minimumLevelPhreaticLineAtDikeTopRiver = new RoundedDouble(2, double.NaN); minimumLevelPhreaticLineAtDikeTopPolder = new RoundedDouble(2, double.NaN); - UseDefaultOffsets = true; + LocationInputExtreme = new MacroStabilityInwardsLocationInputExtreme(); + LocationInputDaily = new MacroStabilityInwardsLocationInputDaily(); - phreaticLineOffsetBelowDikeTopAtRiver = new RoundedDouble(2, double.NaN); - phreaticLineOffsetBelowDikeTopAtPolder = new RoundedDouble(2, double.NaN); - phreaticLineOffsetBelowShoulderBaseInside = new RoundedDouble(2, double.NaN); - phreaticLineOffsetBelowDikeToeAtPolder = new RoundedDouble(2, double.NaN); - AdjustPhreaticLine3And4ForUplift = true; leakageLengthOutwardsPhreaticLine3 = new RoundedDouble(2, double.NaN); @@ -101,7 +90,6 @@ leakageLengthInwardsPhreaticLine4 = new RoundedDouble(2, double.NaN); piezometricHeadPhreaticLine2Outwards = new RoundedDouble(2, double.NaN); piezometricHeadPhreaticLine2Inwards = new RoundedDouble(2, double.NaN); - penetrationLength = new RoundedDouble(2, double.NaN); GridDeterminationType = MacroStabilityInwardsGridDeterminationType.Automatic; TangentLineDeterminationType = MacroStabilityInwardsTangentLineDeterminationType.LayerSeparated; @@ -354,22 +342,6 @@ } /// - /// Gets or sets the polder water level. - /// [m+NAP] - /// - public RoundedDouble WaterLevelPolder - { - get - { - return waterLevelPolder; - } - set - { - waterLevelPolder = value.ToPrecision(waterLevelPolder.NumberOfDecimalPlaces); - } - } - - /// /// Gets or sets whether a drainage construction is present. /// public bool DrainageConstructionPresent { get; set; } @@ -439,75 +411,6 @@ } /// - /// Gets or sets whether the default offsets should be used. - /// - public bool UseDefaultOffsets { get; set; } - - /// - /// Gets or sets the offset of the phreatic line below dike top at river. - /// [m] - /// - public RoundedDouble PhreaticLineOffsetBelowDikeTopAtRiver - { - get - { - return phreaticLineOffsetBelowDikeTopAtRiver; - } - set - { - phreaticLineOffsetBelowDikeTopAtRiver = value.ToPrecision(phreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); - } - } - - /// - /// Gets or sets the offset of the phreatic line below dike top at polder. - /// [m] - /// - public RoundedDouble PhreaticLineOffsetBelowDikeTopAtPolder - { - get - { - return phreaticLineOffsetBelowDikeTopAtPolder; - } - set - { - phreaticLineOffsetBelowDikeTopAtPolder = value.ToPrecision(phreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); - } - } - - /// - /// Gets or sets the offset of the phreatic line below shoulder base inside. - /// [m] - /// - public RoundedDouble PhreaticLineOffsetBelowShoulderBaseInside - { - get - { - return phreaticLineOffsetBelowShoulderBaseInside; - } - set - { - phreaticLineOffsetBelowShoulderBaseInside = value.ToPrecision(phreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); - } - } - - /// - /// Gets or sets the offset of the phreatic line below dike toe at polder. - /// [m] - /// - public RoundedDouble PhreaticLineOffsetBelowDikeToeAtPolder - { - get - { - return phreaticLineOffsetBelowDikeToeAtPolder; - } - set - { - phreaticLineOffsetBelowDikeToeAtPolder = value.ToPrecision(phreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); - } - } - - /// /// Gets or sets whether phreatic line 3 and 4 should be adjusted for Uplift. /// public bool AdjustPhreaticLine3And4ForUplift { get; set; } @@ -609,22 +512,16 @@ } /// - /// Gets or sets the penetration length. - /// [m] + /// Gets the locations input values for extreme conditions. /// - public RoundedDouble PenetrationLength - { - get - { - return penetrationLength; - } - set - { - penetrationLength = value.ToPrecision(penetrationLength.NumberOfDecimalPlaces); - } - } + public MacroStabilityInwardsLocationInputExtreme LocationInputExtreme { get; } /// + /// Gets the locations input values for daily conditions. + /// + public MacroStabilityInwardsLocationInputDaily LocationInputDaily { get; } + + /// /// Gets or sets whether zones should be created. /// public bool CreateZones { get; set; } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInput.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInput.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInput.cs (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -0,0 +1,137 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Common.Base; +using Core.Common.Base.Data; +using Ringtoets.Common.Data.Calculation; + +namespace Ringtoets.MacroStabilityInwards.Data +{ + /// + /// Base class that holds all locations input for either daily or + /// extreme conditions for the macro stability inwards calculation. + /// + public abstract class MacroStabilityInwardsLocationInput : Observable, ICalculationInput + { + protected RoundedDouble waterLevelPolder; + protected RoundedDouble phreaticLineOffsetBelowDikeTopAtRiver; + protected RoundedDouble phreaticLineOffsetBelowDikeTopAtPolder; + protected RoundedDouble phreaticLineOffsetBelowShoulderBaseInside; + protected RoundedDouble phreaticLineOffsetBelowDikeToeAtPolder; + + protected MacroStabilityInwardsLocationInput() + { + waterLevelPolder = new RoundedDouble(2, double.NaN); + + UseDefaultOffsets = true; + + phreaticLineOffsetBelowDikeTopAtRiver = new RoundedDouble(2, double.NaN); + phreaticLineOffsetBelowDikeTopAtPolder = new RoundedDouble(2, double.NaN); + phreaticLineOffsetBelowShoulderBaseInside = new RoundedDouble(2, double.NaN); + phreaticLineOffsetBelowDikeToeAtPolder = new RoundedDouble(2, double.NaN); + } + + /// + /// Gets or sets the polder water level. + /// [m+NAP] + /// + public RoundedDouble WaterLevelPolder + { + get + { + return waterLevelPolder; + } + set + { + waterLevelPolder = value.ToPrecision(waterLevelPolder.NumberOfDecimalPlaces); + } + } + + /// + /// Gets or sets whether the default offsets should be used. + /// + public bool UseDefaultOffsets { get; set; } + + /// + /// Gets or sets the offset of the phreatic line below dike top at river. + /// [m] + /// + public RoundedDouble PhreaticLineOffsetBelowDikeTopAtRiver + { + get + { + return phreaticLineOffsetBelowDikeTopAtRiver; + } + set + { + phreaticLineOffsetBelowDikeTopAtRiver = value.ToPrecision(phreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); + } + } + + /// + /// Gets or sets the offset of the phreatic line below dike top at polder. + /// [m] + /// + public RoundedDouble PhreaticLineOffsetBelowDikeTopAtPolder + { + get + { + return phreaticLineOffsetBelowDikeTopAtPolder; + } + set + { + phreaticLineOffsetBelowDikeTopAtPolder = value.ToPrecision(phreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); + } + } + + /// + /// Gets or sets the offset of the phreatic line below shoulder base inside. + /// [m] + /// + public RoundedDouble PhreaticLineOffsetBelowShoulderBaseInside + { + get + { + return phreaticLineOffsetBelowShoulderBaseInside; + } + set + { + phreaticLineOffsetBelowShoulderBaseInside = value.ToPrecision(phreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); + } + } + + /// + /// Gets or sets the offset of the phreatic line below dike toe at polder. + /// [m] + /// + public RoundedDouble PhreaticLineOffsetBelowDikeToeAtPolder + { + get + { + return phreaticLineOffsetBelowDikeToeAtPolder; + } + set + { + phreaticLineOffsetBelowDikeToeAtPolder = value.ToPrecision(phreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); + } + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputDaily.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputDaily.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputDaily.cs (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -0,0 +1,44 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Common.Base.Data; + +namespace Ringtoets.MacroStabilityInwards.Data +{ + /// + /// Class that holds all locations input daily conditions + /// for the macro stability inwards calculation. + /// + public class MacroStabilityInwardsLocationInputDaily : MacroStabilityInwardsLocationInput + { + /// + /// Gets the penetration length. + /// [m] + /// + public RoundedDouble PenetrationLength + { + get + { + return new RoundedDouble(2); + } + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputExtreme.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputExtreme.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsLocationInputExtreme.cs (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -0,0 +1,58 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Common.Base.Data; + +namespace Ringtoets.MacroStabilityInwards.Data +{ + /// + /// Base class that holds all locations input for extreme conditions + /// for the macro stability inwards calculation. + /// + public class MacroStabilityInwardsLocationInputExtreme : MacroStabilityInwardsLocationInput + { + private RoundedDouble penetrationLength; + + /// + /// Initializes a new instance of the class. + /// + public MacroStabilityInwardsLocationInputExtreme() + { + penetrationLength = new RoundedDouble(2, double.NaN); + } + + /// + /// Gets or sets the penetration length. + /// [m] + /// + public RoundedDouble PenetrationLength + { + get + { + return penetrationLength; + } + set + { + penetrationLength = value.ToPrecision(penetrationLength.NumberOfDecimalPlaces); + } + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj =================================================================== diff -u -r59adecfc7f82ab8277440ecae147453f5cbddbbf -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision 59adecfc7f82ab8277440ecae147453f5cbddbbf) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -49,6 +49,8 @@ + + @@ -57,6 +59,7 @@ + Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsOffsetProperties.cs =================================================================== diff -u -r82e52ce72856fab42af51e186cb8c48f0a45cc30 -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsOffsetProperties.cs (.../MacroStabilityInwardsOffsetProperties.cs) (revision 82e52ce72856fab42af51e186cb8c48f0a45cc30) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsOffsetProperties.cs (.../MacroStabilityInwardsOffsetProperties.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -35,7 +35,7 @@ /// /// ViewModel of offset properties in for properties panel. /// - public class MacroStabilityInwardsOffsetProperties : ObjectProperties + public class MacroStabilityInwardsOffsetProperties : ObjectProperties { private const int useDefaultOffsetsPropertyIndex = 1; private const int phreaticLineOffsetBelowDikeTopAtRiverPropertyIndex = 2; @@ -51,7 +51,7 @@ /// The data of the properties. /// The handler responsible for handling effects of a property change. /// Thrown when any parameter is null. - public MacroStabilityInwardsOffsetProperties(MacroStabilityInwardsInput data, IObservablePropertyChangeHandler handler) + public MacroStabilityInwardsOffsetProperties(MacroStabilityInwardsLocationInput data, IObservablePropertyChangeHandler handler) { if (data == null) { Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsWaterStressesProperties.cs =================================================================== diff -u -rbf0a7527d0942c4646c9b6b9c49d21b58346431c -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsWaterStressesProperties.cs (.../MacroStabilityInwardsWaterStressesProperties.cs) (revision bf0a7527d0942c4646c9b6b9c49d21b58346431c) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsWaterStressesProperties.cs (.../MacroStabilityInwardsWaterStressesProperties.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -99,11 +99,11 @@ { get { - return data.WaterLevelPolder; + return data.LocationInputExtreme.WaterLevelPolder; } set { - PropertyChangeHelper.ChangePropertyAndNotify(() => data.WaterLevelPolder = value, propertyChangeHandler); + PropertyChangeHelper.ChangePropertyAndNotify(() => data.LocationInputExtreme.WaterLevelPolder = value, propertyChangeHandler); } } @@ -161,7 +161,7 @@ { get { - return new MacroStabilityInwardsOffsetProperties(data, propertyChangeHandler); + return new MacroStabilityInwardsOffsetProperties(data.LocationInputExtreme, propertyChangeHandler); } } @@ -285,11 +285,11 @@ { get { - return data.PenetrationLength; + return data.LocationInputExtreme.PenetrationLength; } set { - PropertyChangeHelper.ChangePropertyAndNotify(() => data.PenetrationLength = value, propertyChangeHandler); + PropertyChangeHelper.ChangePropertyAndNotify(() => data.LocationInputExtreme.PenetrationLength = value, propertyChangeHandler); } } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/UpliftVanPhreaticLineOffsetsConverter.cs =================================================================== diff -u -ra764bc9919f8a543a482391e5672af96ca5f73ea -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/UpliftVanPhreaticLineOffsetsConverter.cs (.../UpliftVanPhreaticLineOffsetsConverter.cs) (revision a764bc9919f8a543a482391e5672af96ca5f73ea) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/UpliftVanPhreaticLineOffsetsConverter.cs (.../UpliftVanPhreaticLineOffsetsConverter.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -26,20 +26,20 @@ namespace Ringtoets.MacroStabilityInwards.Service.Converters { /// - /// Converter to convert phreatic line offset properties + /// Converter to convert phreatic line offset properties /// into . /// internal static class UpliftVanPhreaticLineOffsetsConverter { /// - /// Converts phreatic line offset properties + /// Converts phreatic line offset properties /// into . /// /// The input to get the properties from. /// The converted . /// Thrown when /// is null. - public static UpliftVanPhreaticLineOffsets Convert(MacroStabilityInwardsInput input) + public static UpliftVanPhreaticLineOffsets Convert(MacroStabilityInwardsLocationInput input) { if (input == null) { Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs =================================================================== diff -u -r033ca01060a0c95309376e9aa14e33575ca1b19c -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision 033ca01060a0c95309376e9aa14e33575ca1b19c) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -200,11 +200,11 @@ SurfaceLine = inputParameters.SurfaceLine, SoilProfile = UpliftVanSoilProfileConverter.Convert(inputParameters.SoilProfileUnderSurfaceLine), DrainageConstruction = UpliftVanDrainageConstructionConverter.Convert(inputParameters), - PhreaticLineOffsets = UpliftVanPhreaticLineOffsetsConverter.Convert(inputParameters), + PhreaticLineOffsets = UpliftVanPhreaticLineOffsetsConverter.Convert(inputParameters.LocationInputExtreme), SlipPlane = UpliftVanSlipPlaneConverter.Convert(inputParameters), DikeSoilScenario = inputParameters.DikeSoilScenario, WaterLevelRiverAverage = inputParameters.WaterLevelRiverAverage, - WaterLevelPolder = inputParameters.WaterLevelPolder, + WaterLevelPolder = inputParameters.LocationInputExtreme.WaterLevelPolder, MinimumLevelPhreaticLineAtDikeTopRiver = inputParameters.MinimumLevelPhreaticLineAtDikeTopRiver, MinimumLevelPhreaticLineAtDikeTopPolder = inputParameters.MinimumLevelPhreaticLineAtDikeTopPolder, LeakageLengthOutwardsPhreaticLine3 = inputParameters.LeakageLengthOutwardsPhreaticLine3, @@ -213,7 +213,7 @@ LeakageLengthInwardsPhreaticLine4 = inputParameters.LeakageLengthInwardsPhreaticLine4, PiezometricHeadPhreaticLine2Outwards = inputParameters.PiezometricHeadPhreaticLine2Outwards, PiezometricHeadPhreaticLine2Inwards = inputParameters.PiezometricHeadPhreaticLine2Inwards, - PenetrationLength = inputParameters.PenetrationLength, + PenetrationLength = inputParameters.LocationInputExtreme.PenetrationLength, AdjustPhreaticLine3And4ForUplift = inputParameters.AdjustPhreaticLine3And4ForUplift, MoveGrid = inputParameters.MoveGrid, MaximumSliceWidth = inputParameters.MaximumSliceWidth, Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsInputTest.cs =================================================================== diff -u -r59adecfc7f82ab8277440ecae147453f5cbddbbf -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsInputTest.cs (.../MacroStabilityInwardsInputTest.cs) (revision 59adecfc7f82ab8277440ecae147453f5cbddbbf) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsInputTest.cs (.../MacroStabilityInwardsInputTest.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -72,9 +72,46 @@ Assert.IsNaN(inputParameters.WaterLevelRiverAverage); Assert.AreEqual(2, inputParameters.WaterLevelRiverAverage.NumberOfDecimalPlaces); - Assert.IsNaN(inputParameters.WaterLevelPolder); - Assert.AreEqual(2, inputParameters.WaterLevelPolder.NumberOfDecimalPlaces); + Assert.IsNaN(inputParameters.LocationInputExtreme.WaterLevelPolder); + Assert.AreEqual(2, inputParameters.LocationInputExtreme.WaterLevelPolder.NumberOfDecimalPlaces); + Assert.IsNaN(inputParameters.LocationInputExtreme.PenetrationLength); + Assert.AreEqual(2, inputParameters.LocationInputExtreme.PenetrationLength.NumberOfDecimalPlaces); + + Assert.IsTrue(inputParameters.LocationInputExtreme.UseDefaultOffsets); + + Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtRiver); + Assert.AreEqual(2, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); + + Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtPolder); + Assert.AreEqual(2, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); + + Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowShoulderBaseInside); + Assert.AreEqual(2, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); + + Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeToeAtPolder); + Assert.AreEqual(2, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); + + Assert.IsNaN(inputParameters.LocationInputDaily.WaterLevelPolder); + Assert.AreEqual(2, inputParameters.LocationInputDaily.WaterLevelPolder.NumberOfDecimalPlaces); + + Assert.AreEqual(0.0, inputParameters.LocationInputDaily.PenetrationLength); + Assert.AreEqual(2, inputParameters.LocationInputDaily.PenetrationLength.NumberOfDecimalPlaces); + + Assert.IsTrue(inputParameters.LocationInputDaily.UseDefaultOffsets); + + Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtRiver); + Assert.AreEqual(2, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); + + Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtPolder); + Assert.AreEqual(2, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); + + Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowShoulderBaseInside); + Assert.AreEqual(2, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); + + Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeToeAtPolder); + Assert.AreEqual(2, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); + Assert.IsFalse(inputParameters.DrainageConstructionPresent); Assert.IsNaN(inputParameters.XCoordinateDrainageConstruction); @@ -89,20 +126,6 @@ Assert.IsNaN(inputParameters.MinimumLevelPhreaticLineAtDikeTopPolder); Assert.AreEqual(2, inputParameters.MinimumLevelPhreaticLineAtDikeTopPolder.NumberOfDecimalPlaces); - Assert.IsTrue(inputParameters.UseDefaultOffsets); - - Assert.IsNaN(inputParameters.PhreaticLineOffsetBelowDikeTopAtRiver); - Assert.AreEqual(2, inputParameters.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); - - Assert.IsNaN(inputParameters.PhreaticLineOffsetBelowDikeTopAtPolder); - Assert.AreEqual(2, inputParameters.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); - - Assert.IsNaN(inputParameters.PhreaticLineOffsetBelowShoulderBaseInside); - Assert.AreEqual(2, inputParameters.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); - - Assert.IsNaN(inputParameters.PhreaticLineOffsetBelowDikeToeAtPolder); - Assert.AreEqual(2, inputParameters.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); - Assert.IsTrue(inputParameters.AdjustPhreaticLine3And4ForUplift); Assert.IsNaN(inputParameters.LeakageLengthOutwardsPhreaticLine3); @@ -123,9 +146,6 @@ Assert.IsNaN(inputParameters.PiezometricHeadPhreaticLine2Inwards); Assert.AreEqual(2, inputParameters.PiezometricHeadPhreaticLine2Inwards.NumberOfDecimalPlaces); - Assert.IsNaN(inputParameters.PenetrationLength); - Assert.AreEqual(2, inputParameters.PenetrationLength.NumberOfDecimalPlaces); - Assert.AreEqual(MacroStabilityInwardsGridDeterminationType.Automatic, inputParameters.GridDeterminationType); Assert.AreEqual(MacroStabilityInwardsTangentLineDeterminationType.LayerSeparated, inputParameters.TangentLineDeterminationType); @@ -151,22 +171,16 @@ double slipPlaneMinimumLength = random.Next(); double maximumSliceWidth = random.Next(); double waterLevelRiverAverage = random.Next(); - double waterLevelPolder = random.Next(); double xCoordinateDrainageConstruction = random.Next(); double zCoordinateDrainageConstruction = random.Next(); double minimumLevelPhreaticLineAtDikeTopRiver = random.Next(); double minimumLevelPhreaticLineAtDikeTopPolder = random.Next(); - double phreaticLineOffsetBelowDikeTopAtRiver = random.Next(); - double phreaticLineOffsetBelowDikeTopAtPolder = random.Next(); - double phreaticLineOffsetBelowShoulderBaseInside = random.Next(); - double phreaticLineOffsetBelowDikeToeAtPolder = random.Next(); double leakageLengthOutwardsPhreaticLine3 = random.Next(); double leakageLengthInwardsPhreaticLine3 = random.Next(); double leakageLengthOutwardsPhreaticLine4 = random.Next(); double leakageLengthInwardsPhreaticLine4 = random.Next(); double piezometricHeadPhreaticLine2Outwards = random.Next(); double piezometricHeadPhreaticLine2Inwards = random.Next(); - double penetrationLength = random.Next(); double tangentLineZTop = random.Next(); double tangentLineZBottom = random.Next(); @@ -177,22 +191,16 @@ SlipPlaneMinimumLength = (RoundedDouble) slipPlaneMinimumLength, MaximumSliceWidth = (RoundedDouble) maximumSliceWidth, WaterLevelRiverAverage = (RoundedDouble) waterLevelRiverAverage, - WaterLevelPolder = (RoundedDouble) waterLevelPolder, XCoordinateDrainageConstruction = (RoundedDouble) xCoordinateDrainageConstruction, ZCoordinateDrainageConstruction = (RoundedDouble) zCoordinateDrainageConstruction, MinimumLevelPhreaticLineAtDikeTopRiver = (RoundedDouble) minimumLevelPhreaticLineAtDikeTopRiver, MinimumLevelPhreaticLineAtDikeTopPolder = (RoundedDouble) minimumLevelPhreaticLineAtDikeTopPolder, - PhreaticLineOffsetBelowDikeTopAtRiver = (RoundedDouble) phreaticLineOffsetBelowDikeTopAtRiver, - PhreaticLineOffsetBelowDikeTopAtPolder = (RoundedDouble) phreaticLineOffsetBelowDikeTopAtPolder, - PhreaticLineOffsetBelowShoulderBaseInside = (RoundedDouble) phreaticLineOffsetBelowShoulderBaseInside, - PhreaticLineOffsetBelowDikeToeAtPolder = (RoundedDouble) phreaticLineOffsetBelowDikeToeAtPolder, LeakageLengthOutwardsPhreaticLine3 = (RoundedDouble) leakageLengthOutwardsPhreaticLine3, LeakageLengthInwardsPhreaticLine3 = (RoundedDouble) leakageLengthInwardsPhreaticLine3, LeakageLengthOutwardsPhreaticLine4 = (RoundedDouble) leakageLengthOutwardsPhreaticLine4, LeakageLengthInwardsPhreaticLine4 = (RoundedDouble) leakageLengthInwardsPhreaticLine4, PiezometricHeadPhreaticLine2Outwards = (RoundedDouble) piezometricHeadPhreaticLine2Outwards, PiezometricHeadPhreaticLine2Inwards = (RoundedDouble) piezometricHeadPhreaticLine2Inwards, - PenetrationLength = (RoundedDouble) penetrationLength, TangentLineZTop = (RoundedDouble) tangentLineZTop, TangentLineZBottom = (RoundedDouble) tangentLineZBottom }; @@ -202,22 +210,16 @@ Assert.AreEqual(new RoundedDouble(2, slipPlaneMinimumLength), input.SlipPlaneMinimumLength); Assert.AreEqual(new RoundedDouble(2, maximumSliceWidth), input.MaximumSliceWidth); Assert.AreEqual(new RoundedDouble(2, waterLevelRiverAverage), input.WaterLevelRiverAverage); - Assert.AreEqual(new RoundedDouble(2, waterLevelPolder), input.WaterLevelPolder); Assert.AreEqual(new RoundedDouble(2, xCoordinateDrainageConstruction), input.XCoordinateDrainageConstruction); Assert.AreEqual(new RoundedDouble(2, zCoordinateDrainageConstruction), input.ZCoordinateDrainageConstruction); Assert.AreEqual(new RoundedDouble(2, minimumLevelPhreaticLineAtDikeTopRiver), input.MinimumLevelPhreaticLineAtDikeTopRiver); Assert.AreEqual(new RoundedDouble(2, minimumLevelPhreaticLineAtDikeTopPolder), input.MinimumLevelPhreaticLineAtDikeTopPolder); - Assert.AreEqual(new RoundedDouble(2, phreaticLineOffsetBelowDikeTopAtRiver), input.PhreaticLineOffsetBelowDikeTopAtRiver); - Assert.AreEqual(new RoundedDouble(2, phreaticLineOffsetBelowDikeTopAtPolder), input.PhreaticLineOffsetBelowDikeTopAtPolder); - Assert.AreEqual(new RoundedDouble(2, phreaticLineOffsetBelowShoulderBaseInside), input.PhreaticLineOffsetBelowShoulderBaseInside); - Assert.AreEqual(new RoundedDouble(2, phreaticLineOffsetBelowDikeToeAtPolder), input.PhreaticLineOffsetBelowDikeToeAtPolder); Assert.AreEqual(new RoundedDouble(2, leakageLengthOutwardsPhreaticLine3), input.LeakageLengthOutwardsPhreaticLine3); Assert.AreEqual(new RoundedDouble(2, leakageLengthInwardsPhreaticLine3), input.LeakageLengthInwardsPhreaticLine3); Assert.AreEqual(new RoundedDouble(2, leakageLengthOutwardsPhreaticLine4), input.LeakageLengthOutwardsPhreaticLine4); Assert.AreEqual(new RoundedDouble(2, leakageLengthInwardsPhreaticLine4), input.LeakageLengthInwardsPhreaticLine4); Assert.AreEqual(new RoundedDouble(2, piezometricHeadPhreaticLine2Outwards), input.PiezometricHeadPhreaticLine2Outwards); Assert.AreEqual(new RoundedDouble(2, piezometricHeadPhreaticLine2Inwards), input.PiezometricHeadPhreaticLine2Inwards); - Assert.AreEqual(new RoundedDouble(2, penetrationLength), input.PenetrationLength); Assert.AreEqual(new RoundedDouble(2, tangentLineZTop), input.TangentLineZTop); Assert.AreEqual(new RoundedDouble(2, tangentLineZBottom), input.TangentLineZBottom); } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputDailyTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputDailyTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputDailyTest.cs (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -0,0 +1,55 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using NUnit.Framework; + +namespace Ringtoets.MacroStabilityInwards.Data.Test +{ + public class MacroStabilityInwardsLocationInputDailyTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var locationInput = new MacroStabilityInwardsLocationInputDaily(); + + // Assert + Assert.IsInstanceOf(locationInput); + + Assert.IsTrue(locationInput.UseDefaultOffsets); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtRiver); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtPolder); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowShoulderBaseInside); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeToeAtPolder); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); + + Assert.AreEqual(0.0, locationInput.PenetrationLength); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputExtremeTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputExtremeTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputExtremeTest.cs (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -0,0 +1,74 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Core.Common.Base.Data; +using NUnit.Framework; + +namespace Ringtoets.MacroStabilityInwards.Data.Test +{ + public class MacroStabilityInwardsLocationInputExtremeTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var locationInput = new MacroStabilityInwardsLocationInputExtreme(); + + // Assert + Assert.IsInstanceOf(locationInput); + + Assert.IsTrue(locationInput.UseDefaultOffsets); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtRiver); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtPolder); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowShoulderBaseInside); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeToeAtPolder); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PenetrationLength); + Assert.AreEqual(2, locationInput.PenetrationLength.NumberOfDecimalPlaces); + } + + [Test] + public void Constructor_SetPenetrationLength_ExpectedValue() + { + // Setup + var random = new Random(); + double penetrationLength = random.Next(); + + // Call + var locationInput = new MacroStabilityInwardsLocationInputExtreme + { + PenetrationLength = (RoundedDouble) penetrationLength + }; + + // Assert + Assert.AreEqual(new RoundedDouble(2, penetrationLength), locationInput.PenetrationLength); + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsLocationInputTest.cs (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -0,0 +1,87 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Core.Common.Base; +using Core.Common.Base.Data; +using NUnit.Framework; +using Ringtoets.Common.Data.Calculation; + +namespace Ringtoets.MacroStabilityInwards.Data.Test +{ + public class MacroStabilityInwardsLocationInputTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var locationInput = new TestMacroStabilityInwardsLocationInput(); + + // Assert + Assert.IsInstanceOf(locationInput); + Assert.IsInstanceOf(locationInput); + + Assert.IsTrue(locationInput.UseDefaultOffsets); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtRiver); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtRiver.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeTopAtPolder); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeTopAtPolder.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowShoulderBaseInside); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowShoulderBaseInside.NumberOfDecimalPlaces); + + Assert.IsNaN(locationInput.PhreaticLineOffsetBelowDikeToeAtPolder); + Assert.AreEqual(2, locationInput.PhreaticLineOffsetBelowDikeToeAtPolder.NumberOfDecimalPlaces); + } + + [Test] + public void Constructor_SetProperties_ExpectedValues() + { + // Setup + var random = new Random(); + double phreaticLineOffsetBelowDikeTopAtRiver = random.Next(); + double phreaticLineOffsetBelowDikeTopAtPolder = random.Next(); + double phreaticLineOffsetBelowShoulderBaseInside = random.Next(); + double phreaticLineOffsetBelowDikeToeAtPolder = random.Next(); + + // Call + var locationInput = new TestMacroStabilityInwardsLocationInput + { + UseDefaultOffsets = false, + PhreaticLineOffsetBelowDikeTopAtPolder = (RoundedDouble) phreaticLineOffsetBelowDikeTopAtPolder, + PhreaticLineOffsetBelowDikeToeAtPolder = (RoundedDouble) phreaticLineOffsetBelowDikeToeAtPolder, + PhreaticLineOffsetBelowDikeTopAtRiver = (RoundedDouble) phreaticLineOffsetBelowDikeTopAtRiver, + PhreaticLineOffsetBelowShoulderBaseInside = (RoundedDouble) phreaticLineOffsetBelowShoulderBaseInside + }; + + // Assert + Assert.IsFalse(locationInput.UseDefaultOffsets); + Assert.AreEqual(new RoundedDouble(2, phreaticLineOffsetBelowDikeTopAtPolder), locationInput.PhreaticLineOffsetBelowDikeTopAtPolder); + Assert.AreEqual(new RoundedDouble(2, phreaticLineOffsetBelowDikeToeAtPolder), locationInput.PhreaticLineOffsetBelowDikeToeAtPolder); + Assert.AreEqual(new RoundedDouble(2, phreaticLineOffsetBelowDikeTopAtRiver), locationInput.PhreaticLineOffsetBelowDikeTopAtRiver); + Assert.AreEqual(new RoundedDouble(2, phreaticLineOffsetBelowShoulderBaseInside), locationInput.PhreaticLineOffsetBelowShoulderBaseInside); + } + + private class TestMacroStabilityInwardsLocationInput : MacroStabilityInwardsLocationInput {} + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj =================================================================== diff -u -r59adecfc7f82ab8277440ecae147453f5cbddbbf -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision 59adecfc7f82ab8277440ecae147453f5cbddbbf) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -63,6 +63,9 @@ + + + Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsCalculationScenarioFactoryTest.cs =================================================================== diff -u -r0b660ff4f3aeb4be02ae4c5ea42813c28aeae8fe -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsCalculationScenarioFactoryTest.cs (.../MacroStabilityInwardsCalculationScenarioFactoryTest.cs) (revision 0b660ff4f3aeb4be02ae4c5ea42813c28aeae8fe) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsCalculationScenarioFactoryTest.cs (.../MacroStabilityInwardsCalculationScenarioFactoryTest.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -168,27 +168,37 @@ Assert.AreEqual(MacroStabilityInwardsDikeSoilScenario.ClayDikeOnClay, inputParameters.DikeSoilScenario); Assert.IsNaN(inputParameters.WaterLevelRiverAverage); - Assert.IsNaN(inputParameters.WaterLevelPolder); Assert.IsFalse(inputParameters.DrainageConstructionPresent); Assert.IsNaN(inputParameters.XCoordinateDrainageConstruction); Assert.IsNaN(inputParameters.ZCoordinateDrainageConstruction); Assert.IsNaN(inputParameters.MinimumLevelPhreaticLineAtDikeTopRiver); Assert.IsNaN(inputParameters.MinimumLevelPhreaticLineAtDikeTopPolder); - Assert.IsTrue(inputParameters.UseDefaultOffsets); - Assert.IsNaN(inputParameters.PhreaticLineOffsetBelowDikeTopAtRiver); - Assert.IsNaN(inputParameters.PhreaticLineOffsetBelowDikeTopAtPolder); - Assert.IsNaN(inputParameters.PhreaticLineOffsetBelowShoulderBaseInside); - Assert.IsNaN(inputParameters.PhreaticLineOffsetBelowDikeToeAtPolder); + + Assert.IsNaN(inputParameters.LocationInputExtreme.WaterLevelPolder); + Assert.IsTrue(inputParameters.LocationInputExtreme.UseDefaultOffsets); + Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtRiver); + Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtPolder); + Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowShoulderBaseInside); + Assert.IsNaN(inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeToeAtPolder); + Assert.IsNaN(inputParameters.LocationInputExtreme.PenetrationLength); + + Assert.IsNaN(inputParameters.LocationInputDaily.WaterLevelPolder); + Assert.IsTrue(inputParameters.LocationInputDaily.UseDefaultOffsets); + Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtRiver); + Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtPolder); + Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowShoulderBaseInside); + Assert.IsNaN(inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeToeAtPolder); + Assert.AreEqual(0, inputParameters.LocationInputDaily.PenetrationLength, inputParameters.LocationInputDaily.PenetrationLength.GetAccuracy()); + Assert.IsTrue(inputParameters.AdjustPhreaticLine3And4ForUplift); Assert.IsNaN(inputParameters.LeakageLengthOutwardsPhreaticLine3); Assert.IsNaN(inputParameters.LeakageLengthInwardsPhreaticLine3); Assert.IsNaN(inputParameters.LeakageLengthOutwardsPhreaticLine4); Assert.IsNaN(inputParameters.LeakageLengthInwardsPhreaticLine4); Assert.IsNaN(inputParameters.PiezometricHeadPhreaticLine2Outwards); Assert.IsNaN(inputParameters.PiezometricHeadPhreaticLine2Inwards); - Assert.IsNaN(inputParameters.PenetrationLength); Assert.AreEqual(MacroStabilityInwardsGridDeterminationType.Automatic, inputParameters.GridDeterminationType); Assert.AreEqual(MacroStabilityInwardsTangentLineDeterminationType.LayerSeparated, inputParameters.TangentLineDeterminationType); Assert.IsNaN(inputParameters.TangentLineZTop); @@ -208,24 +218,34 @@ // Assert MacroStabilityInwardsInput inputParameters = scenario.InputParameters; Assert.AreEqual(MacroStabilityInwardsDikeSoilScenario.SandDikeOnClay, inputParameters.DikeSoilScenario); - Assert.AreEqual(0.5, inputParameters.WaterLevelPolder); Assert.AreEqual(1, inputParameters.PiezometricHeadPhreaticLine2Outwards.Value); Assert.AreEqual(1, inputParameters.PiezometricHeadPhreaticLine2Inwards.Value); Assert.IsTrue(inputParameters.AdjustPhreaticLine3And4ForUplift); - Assert.IsFalse(inputParameters.UseDefaultOffsets); Assert.AreEqual(1, inputParameters.LeakageLengthOutwardsPhreaticLine3.Value); Assert.AreEqual(1, inputParameters.LeakageLengthInwardsPhreaticLine3.Value); Assert.AreEqual(1, inputParameters.LeakageLengthInwardsPhreaticLine4.Value); Assert.AreEqual(1, inputParameters.LeakageLengthOutwardsPhreaticLine4.Value); - Assert.AreEqual(1, inputParameters.PenetrationLength.Value); Assert.AreEqual(1, inputParameters.SlipPlaneMinimumDepth.Value); Assert.AreEqual(1, inputParameters.SlipPlaneMinimumLength.Value); Assert.AreEqual(1, inputParameters.MinimumLevelPhreaticLineAtDikeTopPolder.Value); Assert.AreEqual(1, inputParameters.MinimumLevelPhreaticLineAtDikeTopRiver.Value); - Assert.AreEqual(1, inputParameters.PhreaticLineOffsetBelowDikeTopAtRiver.Value); - Assert.AreEqual(1, inputParameters.PhreaticLineOffsetBelowDikeToeAtPolder.Value); - Assert.AreEqual(1, inputParameters.PhreaticLineOffsetBelowDikeTopAtPolder.Value); - Assert.AreEqual(1, inputParameters.PhreaticLineOffsetBelowShoulderBaseInside.Value); + + Assert.AreEqual(0.5, inputParameters.LocationInputExtreme.WaterLevelPolder); + Assert.IsFalse(inputParameters.LocationInputExtreme.UseDefaultOffsets); + Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtRiver.Value); + Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeToeAtPolder.Value); + Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtPolder.Value); + Assert.AreEqual(1, inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowShoulderBaseInside.Value); + Assert.AreEqual(1, inputParameters.LocationInputExtreme.PenetrationLength.Value); + + Assert.AreEqual(0.5, inputParameters.LocationInputDaily.WaterLevelPolder); + Assert.IsFalse(inputParameters.LocationInputDaily.UseDefaultOffsets); + Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtRiver.Value); + Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeToeAtPolder.Value); + Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowDikeTopAtPolder.Value); + Assert.AreEqual(1, inputParameters.LocationInputDaily.PhreaticLineOffsetBelowShoulderBaseInside.Value); + Assert.AreEqual(0, inputParameters.LocationInputDaily.PenetrationLength.Value); + Assert.IsTrue(inputParameters.DrainageConstructionPresent); Assert.AreEqual(1, inputParameters.XCoordinateDrainageConstruction.Value); Assert.AreEqual(1, inputParameters.ZCoordinateDrainageConstruction.Value); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs =================================================================== diff -u -r0b660ff4f3aeb4be02ae4c5ea42813c28aeae8fe -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs (.../MacroStabilityInwardsCalculationScenarioFactory.cs) (revision 0b660ff4f3aeb4be02ae4c5ea42813c28aeae8fe) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsCalculationScenarioFactory.cs (.../MacroStabilityInwardsCalculationScenarioFactory.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -233,24 +233,36 @@ StochasticSoilProfile = stochasticSoilProfile, HydraulicBoundaryLocation = hydraulicBoundaryLocation, DikeSoilScenario = MacroStabilityInwardsDikeSoilScenario.SandDikeOnClay, - WaterLevelPolder = new RoundedDouble(5, 0.5), + LocationInputExtreme = + { + WaterLevelPolder = new RoundedDouble(5, 0.5), + UseDefaultOffsets = false, + PenetrationLength = new RoundedDouble(5, 1.0), + PhreaticLineOffsetBelowDikeToeAtPolder = new RoundedDouble(5, 1.0), + PhreaticLineOffsetBelowDikeTopAtPolder = new RoundedDouble(5, 1.0), + PhreaticLineOffsetBelowDikeTopAtRiver = new RoundedDouble(5, 1.0), + PhreaticLineOffsetBelowShoulderBaseInside = new RoundedDouble(5, 1.0) + }, + LocationInputDaily = + { + WaterLevelPolder = new RoundedDouble(5, 0.5), + UseDefaultOffsets = false, + PhreaticLineOffsetBelowDikeToeAtPolder = new RoundedDouble(5, 1.0), + PhreaticLineOffsetBelowDikeTopAtPolder = new RoundedDouble(5, 1.0), + PhreaticLineOffsetBelowDikeTopAtRiver = new RoundedDouble(5, 1.0), + PhreaticLineOffsetBelowShoulderBaseInside = new RoundedDouble(5, 1.0) + }, PiezometricHeadPhreaticLine2Outwards = new RoundedDouble(5, 1.0), PiezometricHeadPhreaticLine2Inwards = new RoundedDouble(5, 1.0), AdjustPhreaticLine3And4ForUplift = true, - UseDefaultOffsets = false, LeakageLengthInwardsPhreaticLine3 = new RoundedDouble(5, 1.0), LeakageLengthOutwardsPhreaticLine3 = new RoundedDouble(5, 1.0), LeakageLengthOutwardsPhreaticLine4 = new RoundedDouble(5, 1.0), LeakageLengthInwardsPhreaticLine4 = new RoundedDouble(5, 1.0), - PenetrationLength = new RoundedDouble(5, 1.0), SlipPlaneMinimumLength = new RoundedDouble(5, 1.0), SlipPlaneMinimumDepth = new RoundedDouble(5, 1.0), MinimumLevelPhreaticLineAtDikeTopPolder = new RoundedDouble(5, 1.0), MinimumLevelPhreaticLineAtDikeTopRiver = new RoundedDouble(5, 1.0), - PhreaticLineOffsetBelowDikeToeAtPolder = new RoundedDouble(5, 1.0), - PhreaticLineOffsetBelowDikeTopAtPolder = new RoundedDouble(5, 1.0), - PhreaticLineOffsetBelowDikeTopAtRiver = new RoundedDouble(5, 1.0), - PhreaticLineOffsetBelowShoulderBaseInside = new RoundedDouble(5, 1.0), DrainageConstructionPresent = true, XCoordinateDrainageConstruction = new RoundedDouble(5, 1.0), ZCoordinateDrainageConstruction = new RoundedDouble(5, 1.0), Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsOffsetPropertiesTest.cs =================================================================== diff -u -r3f74bb4c7f48c55dd67639ebef7a803567bc3aad -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsOffsetPropertiesTest.cs (.../MacroStabilityInwardsOffsetPropertiesTest.cs) (revision 3f74bb4c7f48c55dd67639ebef7a803567bc3aad) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsOffsetPropertiesTest.cs (.../MacroStabilityInwardsOffsetPropertiesTest.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -53,13 +53,13 @@ var changeHandler = mocks.Stub(); mocks.ReplayAll(); - var input = new MacroStabilityInwardsInput(); + var input = new MacroStabilityInwardsLocationInputExtreme(); // Call var properties = new MacroStabilityInwardsOffsetProperties(input, changeHandler); // Assert - Assert.IsInstanceOf>(properties); + Assert.IsInstanceOf>(properties); Assert.AreSame(input, properties.Data); mocks.VerifyAll(); } @@ -85,7 +85,7 @@ public void Constructor_HandlerNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new MacroStabilityInwardsOffsetProperties(new MacroStabilityInwardsInput(), + TestDelegate call = () => new MacroStabilityInwardsOffsetProperties(new MacroStabilityInwardsLocationInputExtreme(), null); // Assert @@ -103,7 +103,7 @@ var changeHandler = mocks.Stub(); mocks.ReplayAll(); - var input = new MacroStabilityInwardsInput + var input = new MacroStabilityInwardsLocationInputExtreme { UseDefaultOffsets = useDefaultOffsets }; @@ -168,7 +168,7 @@ var changeHandler = mocks.Stub(); mocks.ReplayAll(); - var input = new MacroStabilityInwardsInput(); + var input = new MacroStabilityInwardsLocationInputExtreme(); // Call var properties = new MacroStabilityInwardsOffsetProperties(input, changeHandler); @@ -187,7 +187,7 @@ { // Given var calculationItem = new MacroStabilityInwardsCalculationScenario(); - MacroStabilityInwardsInput input = calculationItem.InputParameters; + MacroStabilityInwardsLocationInput input = calculationItem.InputParameters.LocationInputExtreme; var handler = new ObservablePropertyChangeHandler(calculationItem, input); var properties = new MacroStabilityInwardsOffsetProperties(input, handler); @@ -278,7 +278,7 @@ var handler = mocks.Stub(); mocks.ReplayAll(); - var input = new MacroStabilityInwardsInput + var input = new MacroStabilityInwardsLocationInputExtreme { UseDefaultOffsets = useDefaultOffsets }; @@ -300,7 +300,7 @@ var changeHandler = mocks.Stub(); mocks.ReplayAll(); - var input = new MacroStabilityInwardsInput(); + var input = new MacroStabilityInwardsLocationInputExtreme(); var properties = new MacroStabilityInwardsOffsetProperties(input, changeHandler); // Call @@ -319,7 +319,7 @@ observable.Expect(o => o.NotifyObservers()); mocks.ReplayAll(); - MacroStabilityInwardsInput input = calculation.InputParameters; + MacroStabilityInwardsLocationInput input = calculation.InputParameters.LocationInputExtreme; var handler = new SetPropertyValueAfterConfirmationParameterTester(new[] { Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressesPropertiesTest.cs =================================================================== diff -u -rd619624819b7200ac55b357b0a0c54d198fc20e4 -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressesPropertiesTest.cs (.../MacroStabilityInwardsWaterStressesPropertiesTest.cs) (revision d619624819b7200ac55b357b0a0c54d198fc20e4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsWaterStressesPropertiesTest.cs (.../MacroStabilityInwardsWaterStressesPropertiesTest.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -244,19 +244,19 @@ // Assert Assert.AreEqual(input.WaterLevelRiverAverage, properties.WaterLevelRiverAverage); - Assert.AreEqual(input.WaterLevelPolder, properties.WaterLevelPolder); + Assert.AreEqual(input.LocationInputExtreme.WaterLevelPolder, properties.WaterLevelPolder); Assert.AreSame(input, properties.Drainage.Data); Assert.AreEqual(input.MinimumLevelPhreaticLineAtDikeTopRiver, properties.MinimumLevelPhreaticLineAtDikeTopRiver); Assert.AreEqual(input.MinimumLevelPhreaticLineAtDikeTopPolder, properties.MinimumLevelPhreaticLineAtDikeTopPolder); - Assert.AreSame(input, properties.Offsets.Data); + Assert.AreSame(input.LocationInputExtreme, properties.Offsets.Data); Assert.AreEqual(input.AdjustPhreaticLine3And4ForUplift, properties.AdjustPhreaticLine3And4ForUplift); Assert.AreEqual(input.LeakageLengthOutwardsPhreaticLine3, properties.LeakageLengthOutwardsPhreaticLine3); Assert.AreEqual(input.LeakageLengthInwardsPhreaticLine3, properties.LeakageLengthInwardsPhreaticLine3); Assert.AreEqual(input.LeakageLengthOutwardsPhreaticLine4, properties.LeakageLengthOutwardsPhreaticLine4); Assert.AreEqual(input.LeakageLengthInwardsPhreaticLine4, properties.LeakageLengthInwardsPhreaticLine4); Assert.AreEqual(input.PiezometricHeadPhreaticLine2Outwards, properties.PiezometricHeadPhreaticLine2Outwards); Assert.AreEqual(input.PiezometricHeadPhreaticLine2Inwards, properties.PiezometricHeadPhreaticLine2Inwards); - Assert.AreEqual(input.PenetrationLength, properties.PenetrationLength); + Assert.AreEqual(input.LocationInputExtreme.PenetrationLength, properties.PenetrationLength); mocks.VerifyAll(); } @@ -301,8 +301,8 @@ // Then Assert.AreEqual(waterLevelRiverAverage, input.WaterLevelRiverAverage, input.WaterLevelRiverAverage.GetAccuracy()); - Assert.AreEqual(waterLevelPolder, input.WaterLevelPolder, - input.WaterLevelPolder.GetAccuracy()); + Assert.AreEqual(waterLevelPolder, input.LocationInputExtreme.WaterLevelPolder, + input.LocationInputExtreme.WaterLevelPolder.GetAccuracy()); Assert.AreEqual(minimumLevelPhreaticLineAtDikeTopRiver, input.MinimumLevelPhreaticLineAtDikeTopRiver, input.MinimumLevelPhreaticLineAtDikeTopRiver.GetAccuracy()); Assert.AreEqual(minimumLevelPhreaticLineAtDikeTopPolder, input.MinimumLevelPhreaticLineAtDikeTopPolder, @@ -320,8 +320,8 @@ input.PiezometricHeadPhreaticLine2Outwards.GetAccuracy()); Assert.AreEqual(piezometricHeadPhreaticLine2Inwards, input.PiezometricHeadPhreaticLine2Inwards, input.PiezometricHeadPhreaticLine2Inwards.GetAccuracy()); - Assert.AreEqual(penetrationLength, input.PenetrationLength, - input.PenetrationLength.GetAccuracy()); + Assert.AreEqual(penetrationLength, input.LocationInputExtreme.PenetrationLength, + input.LocationInputExtreme.PenetrationLength.GetAccuracy()); } [Test] Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/UpliftVanPhreaticLineOffsetsConverterTest.cs =================================================================== diff -u -ra764bc9919f8a543a482391e5672af96ca5f73ea -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/UpliftVanPhreaticLineOffsetsConverterTest.cs (.../UpliftVanPhreaticLineOffsetsConverterTest.cs) (revision a764bc9919f8a543a482391e5672af96ca5f73ea) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/UpliftVanPhreaticLineOffsetsConverterTest.cs (.../UpliftVanPhreaticLineOffsetsConverterTest.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -47,7 +47,7 @@ { // Setup var random = new Random(11); - var input = new MacroStabilityInwardsInput + var input = new MacroStabilityInwardsLocationInputExtreme { UseDefaultOffsets = true, PhreaticLineOffsetBelowDikeTopAtRiver = random.NextRoundedDouble(), @@ -72,7 +72,7 @@ { // Setup var random = new Random(11); - var input = new MacroStabilityInwardsInput + var input = new MacroStabilityInwardsLocationInputExtreme { UseDefaultOffsets = false, PhreaticLineOffsetBelowDikeTopAtRiver = random.NextRoundedDouble(), Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs =================================================================== diff -u -r566943640717a91ff377a58a341bbbe1bcd2e516 -ra4daa6d1ccb443d5ab7901f3ac8578dca7064476 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision 566943640717a91ff377a58a341bbbe1bcd2e516) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision a4daa6d1ccb443d5ab7901f3ac8578dca7064476) @@ -463,11 +463,11 @@ // Setup var random = new Random(11); MacroStabilityInwardsInput inputParameters = testCalculation.InputParameters; - inputParameters.UseDefaultOffsets = true; - inputParameters.PhreaticLineOffsetBelowDikeToeAtPolder = random.NextRoundedDouble(); - inputParameters.PhreaticLineOffsetBelowDikeTopAtPolder = random.NextRoundedDouble(); - inputParameters.PhreaticLineOffsetBelowDikeTopAtRiver = random.NextRoundedDouble(); - inputParameters.PhreaticLineOffsetBelowShoulderBaseInside = random.NextRoundedDouble(); + inputParameters.LocationInputExtreme.UseDefaultOffsets = true; + inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeToeAtPolder = random.NextRoundedDouble(); + inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtPolder = random.NextRoundedDouble(); + inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowDikeTopAtRiver = random.NextRoundedDouble(); + inputParameters.LocationInputExtreme.PhreaticLineOffsetBelowShoulderBaseInside = random.NextRoundedDouble(); using (new MacroStabilityInwardsCalculatorFactoryConfig()) { @@ -513,7 +513,7 @@ MacroStabilityInwardsCalculationService.Calculate(testCalculation); // Assert - UpliftVanCalculatorInput actualInput = ((TestMacroStabilityInwardsCalculatorFactory)MacroStabilityInwardsCalculatorFactory.Instance) + UpliftVanCalculatorInput actualInput = ((TestMacroStabilityInwardsCalculatorFactory) MacroStabilityInwardsCalculatorFactory.Instance) .LastCreatedUpliftVanCalculator.Input; Assert.IsTrue(actualInput.SlipPlane.GridAutomaticDetermined); Assert.IsNaN(actualInput.SlipPlane.TangentZTop); @@ -586,7 +586,7 @@ UpliftVanCalculatorInput actualInput = factory.LastCreatedUpliftVanCalculator.Input; UpliftVanCalculatorInputAssert.AssertSoilProfile(originalInput.SoilProfileUnderSurfaceLine, actualInput.SoilProfile); AssertDrainageConstruction(originalInput, actualInput.DrainageConstruction); - AssertPhreaticLineOffsets(originalInput, actualInput.PhreaticLineOffsets); + AssertPhreaticLineOffsets(originalInput.LocationInputExtreme, actualInput.PhreaticLineOffsets); AssertSlipPlaneInput(originalInput, actualInput.SlipPlane); Assert.AreEqual(UpliftVanWaternetCreationMode.CreateWaternet, actualInput.WaternetCreationMode); Assert.AreEqual(UpliftVanPlLineCreationMethod.RingtoetsWti2017, actualInput.PlLineCreationMethod); @@ -595,24 +595,19 @@ Assert.AreEqual(originalInput.AssessmentLevel, actualInput.AssessmentLevel); Assert.AreEqual(originalInput.DikeSoilScenario, actualInput.DikeSoilScenario); Assert.AreEqual(originalInput.WaterLevelRiverAverage, actualInput.WaterLevelRiverAverage); - Assert.AreEqual(originalInput.WaterLevelPolder, actualInput.WaterLevelPolder); + Assert.AreEqual(originalInput.LocationInputExtreme.WaterLevelPolder, actualInput.WaterLevelPolder); Assert.AreEqual(originalInput.DrainageConstructionPresent, actualInput.DrainageConstruction.IsPresent); Assert.AreEqual(originalInput.XCoordinateDrainageConstruction, actualInput.DrainageConstruction.XCoordinate); Assert.AreEqual(originalInput.ZCoordinateDrainageConstruction, actualInput.DrainageConstruction.ZCoordinate); Assert.AreEqual(originalInput.MinimumLevelPhreaticLineAtDikeTopRiver, actualInput.MinimumLevelPhreaticLineAtDikeTopRiver); Assert.AreEqual(originalInput.MinimumLevelPhreaticLineAtDikeTopPolder, actualInput.MinimumLevelPhreaticLineAtDikeTopPolder); - Assert.AreEqual(originalInput.UseDefaultOffsets, actualInput.PhreaticLineOffsets.UseDefaults); - Assert.AreEqual(originalInput.PhreaticLineOffsetBelowDikeTopAtRiver, actualInput.PhreaticLineOffsets.BelowDikeTopAtRiver); - Assert.AreEqual(originalInput.PhreaticLineOffsetBelowDikeTopAtPolder, actualInput.PhreaticLineOffsets.BelowDikeTopAtPolder); - Assert.AreEqual(originalInput.PhreaticLineOffsetBelowShoulderBaseInside, actualInput.PhreaticLineOffsets.BelowShoulderBaseInside); - Assert.AreEqual(originalInput.PhreaticLineOffsetBelowDikeToeAtPolder, actualInput.PhreaticLineOffsets.BelowDikeToeAtPolder); Assert.AreEqual(originalInput.LeakageLengthOutwardsPhreaticLine3, actualInput.LeakageLengthOutwardsPhreaticLine3); Assert.AreEqual(originalInput.LeakageLengthInwardsPhreaticLine3, actualInput.LeakageLengthInwardsPhreaticLine3); Assert.AreEqual(originalInput.LeakageLengthOutwardsPhreaticLine4, actualInput.LeakageLengthOutwardsPhreaticLine4); Assert.AreEqual(originalInput.LeakageLengthInwardsPhreaticLine4, actualInput.LeakageLengthInwardsPhreaticLine4); Assert.AreEqual(originalInput.PiezometricHeadPhreaticLine2Outwards, actualInput.PiezometricHeadPhreaticLine2Outwards); Assert.AreEqual(originalInput.PiezometricHeadPhreaticLine2Inwards, actualInput.PiezometricHeadPhreaticLine2Inwards); - Assert.AreEqual(originalInput.PenetrationLength, actualInput.PenetrationLength); + Assert.AreEqual(originalInput.LocationInputExtreme.PenetrationLength, actualInput.PenetrationLength); Assert.AreEqual(originalInput.AdjustPhreaticLine3And4ForUplift, actualInput.AdjustPhreaticLine3And4ForUplift); Assert.AreEqual(originalInput.MoveGrid, actualInput.MoveGrid); Assert.AreEqual(originalInput.MaximumSliceWidth, actualInput.MaximumSliceWidth); @@ -629,13 +624,13 @@ Assert.AreEqual(originalInput.ZCoordinateDrainageConstruction, actualInput.ZCoordinate); } - private static void AssertPhreaticLineOffsets(MacroStabilityInwardsInput originalInput, UpliftVanPhreaticLineOffsets actualInput) + private static void AssertPhreaticLineOffsets(MacroStabilityInwardsLocationInput expected, UpliftVanPhreaticLineOffsets actual) { - Assert.AreEqual(originalInput.UseDefaultOffsets, actualInput.UseDefaults); - Assert.AreEqual(originalInput.PhreaticLineOffsetBelowDikeTopAtRiver, actualInput.BelowDikeTopAtRiver); - Assert.AreEqual(originalInput.PhreaticLineOffsetBelowDikeTopAtPolder, actualInput.BelowDikeTopAtPolder); - Assert.AreEqual(originalInput.PhreaticLineOffsetBelowDikeToeAtPolder, actualInput.BelowDikeToeAtPolder); - Assert.AreEqual(originalInput.PhreaticLineOffsetBelowShoulderBaseInside, actualInput.BelowShoulderBaseInside); + Assert.AreEqual(expected.UseDefaultOffsets, actual.UseDefaults); + Assert.AreEqual(expected.PhreaticLineOffsetBelowDikeTopAtRiver, actual.BelowDikeTopAtRiver); + Assert.AreEqual(expected.PhreaticLineOffsetBelowDikeTopAtPolder, actual.BelowDikeTopAtPolder); + Assert.AreEqual(expected.PhreaticLineOffsetBelowDikeToeAtPolder, actual.BelowDikeToeAtPolder); + Assert.AreEqual(expected.PhreaticLineOffsetBelowShoulderBaseInside, actual.BelowShoulderBaseInside); } private static void AssertSlipPlaneInput(MacroStabilityInwardsInput originalInput, UpliftVanSlipPlane actualInput)