Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Data/GeneralStabilityPointStructuresInput.cs =================================================================== diff -u -rb930a51f930edf4ea180e3a19da19b6f80ee490c -r2f4d3f3639b049356c93f18333fa4c70650f1b2c --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Data/GeneralStabilityPointStructuresInput.cs (.../GeneralStabilityPointStructuresInput.cs) (revision b930a51f930edf4ea180e3a19da19b6f80ee490c) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Data/GeneralStabilityPointStructuresInput.cs (.../GeneralStabilityPointStructuresInput.cs) (revision 2f4d3f3639b049356c93f18333fa4c70650f1b2c) @@ -19,10 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using Core.Common.Base.Data; using Riskeer.Common.Data.Probabilistics; -using Riskeer.Common.Data.Properties; namespace Riskeer.StabilityPointStructures.Data { @@ -31,20 +29,11 @@ /// public class GeneralStabilityPointStructuresInput { - private const int numberOfDecimalPlacesN = 2; - - private static readonly Range validityRangeN = new Range(new RoundedDouble(numberOfDecimalPlacesN, 1), - new RoundedDouble(numberOfDecimalPlacesN, 20)); - - private RoundedDouble n; - /// /// Initializes a new instance of the class. /// public GeneralStabilityPointStructuresInput() { - n = new RoundedDouble(numberOfDecimalPlacesN, 3.0); - GravitationalAcceleration = new RoundedDouble(2, 9.81); ModelFactorStorageVolume = new LogNormalDistribution(2) @@ -85,39 +74,6 @@ /// public RoundedDouble GravitationalAcceleration { get; } - #region Length effect parameters - - /// - /// Gets or sets the 'N' parameter used to factor in the 'length effect'. - /// - /// Thrown when the - /// is not in the [1.0, 20.0] interval. - public RoundedDouble N - { - get - { - return n; - } - set - { - RoundedDouble newValue = value.ToPrecision(n.NumberOfDecimalPlaces); - if (!validityRangeN.InRange(newValue)) - { - throw new ArgumentOutOfRangeException(nameof(value), string.Format(Resources.N_Value_should_be_in_Range_0_, - validityRangeN)); - } - - n = newValue; - } - } - - /// - /// Gets whether the length effect should be applied in the section. - /// - public bool ApplyLengthEffectInSection => false; - - #endregion - #region Model factors /// Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Data.Test/GeneralStabilityPointStructuresInputTest.cs =================================================================== diff -u -rb930a51f930edf4ea180e3a19da19b6f80ee490c -r2f4d3f3639b049356c93f18333fa4c70650f1b2c --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Data.Test/GeneralStabilityPointStructuresInputTest.cs (.../GeneralStabilityPointStructuresInputTest.cs) (revision b930a51f930edf4ea180e3a19da19b6f80ee490c) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Data.Test/GeneralStabilityPointStructuresInputTest.cs (.../GeneralStabilityPointStructuresInputTest.cs) (revision 2f4d3f3639b049356c93f18333fa4c70650f1b2c) @@ -19,9 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using Core.Common.Base.Data; -using Core.Common.TestUtil; using NUnit.Framework; using Riskeer.Common.Data.Probabilistics; using Riskeer.Common.Data.TestUtil; @@ -63,11 +61,6 @@ var inputParameters = new GeneralStabilityPointStructuresInput(); // Assert - Assert.AreEqual(2, inputParameters.N.NumberOfDecimalPlaces); - Assert.AreEqual(3.0, inputParameters.N, inputParameters.N.GetAccuracy()); - - Assert.IsFalse(inputParameters.ApplyLengthEffectInSection); - Assert.AreEqual(2, inputParameters.GravitationalAcceleration.NumberOfDecimalPlaces); Assert.AreEqual(9.81, inputParameters.GravitationalAcceleration, inputParameters.GravitationalAcceleration.GetAccuracy()); @@ -91,43 +84,5 @@ Assert.AreEqual(2, inputParameters.WaveRatioMaxHStandardDeviation.NumberOfDecimalPlaces); Assert.AreEqual(0.5, inputParameters.WaveRatioMaxHStandardDeviation, inputParameters.WaveRatioMaxHStandardDeviation.GetAccuracy()); } - - [Test] - [TestCase(1.0)] - [TestCase(10.0)] - [TestCase(20.0)] - [TestCase(0.999)] - [TestCase(20.001)] - public void N_SetValidValue_UpdatesValue(double value) - { - // Setup - var generalStabilityPointStructuresInput = new GeneralStabilityPointStructuresInput(); - - // Call - generalStabilityPointStructuresInput.N = (RoundedDouble) value; - - // Assert - Assert.AreEqual(2, generalStabilityPointStructuresInput.N.NumberOfDecimalPlaces); - Assert.AreEqual(value, generalStabilityPointStructuresInput.N, generalStabilityPointStructuresInput.N.GetAccuracy()); - } - - [Test] - [SetCulture("nl-NL")] - [TestCase(-10.0)] - [TestCase(0.99)] - [TestCase(20.01)] - [TestCase(50.0)] - public void N_SetValueOutsideValidRange_ThrowArgumentOutOfRangeException(double value) - { - // Setup - var generalStabilityPointStructuresInput = new GeneralStabilityPointStructuresInput(); - - // Call - TestDelegate test = () => generalStabilityPointStructuresInput.N = (RoundedDouble) value; - - // Assert - const string expectedMessage = "De waarde voor 'N' moet in het bereik [1,00, 20,00] liggen."; - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, expectedMessage); - } } } \ No newline at end of file