Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsStochasticSoilModelCollectionContext.cs =================================================================== diff -u -rc85b5e367887a96d602dfb7a0b46073b6eef84da -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsStochasticSoilModelCollectionContext.cs (.../MacroStabilityInwardsStochasticSoilModelCollectionContext.cs) (revision c85b5e367887a96d602dfb7a0b46073b6eef84da) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PresentationObjects/MacroStabilityInwardsStochasticSoilModelCollectionContext.cs (.../MacroStabilityInwardsStochasticSoilModelCollectionContext.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -30,7 +30,8 @@ /// /// The presentation object for . /// - public class MacroStabilityInwardsStochasticSoilModelCollectionContext : ObservableWrappedObjectContextBase + public class MacroStabilityInwardsStochasticSoilModelCollectionContext + : ObservableWrappedObjectContextBase { /// /// Creates a new instance of . @@ -40,8 +41,8 @@ /// The assessment section. /// Thrown when any input argument is null. public MacroStabilityInwardsStochasticSoilModelCollectionContext(MacroStabilityInwardsStochasticSoilModelCollection wrappedStochasticSoilModels, - MacroStabilityInwardsFailureMechanism failureMechanism, - IAssessmentSection assessmentSection) + MacroStabilityInwardsFailureMechanism failureMechanism, + IAssessmentSection assessmentSection) : base(wrappedStochasticSoilModels) { if (failureMechanism == null) Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs =================================================================== diff -u -re14d435cf9328ecd215e94bd3a34f126b2885e6d -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs (.../MacroStabilityInwardsSoilLayerTransformer.cs) (revision e14d435cf9328ecd215e94bd3a34f126b2885e6d) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs (.../MacroStabilityInwardsSoilLayerTransformer.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -185,10 +185,14 @@ /// Validates whether the values of the distribution and shift for the stochastic parameters /// are correct for creating a soil layer. /// + /// The soil layer to validate. /// Thrown when any of the distributions of the /// stochastic parameters is not defined as lognormal or is shifted when it should not be. private static void ValidateStochasticParameters(SoilLayerBase soilLayer) { + ValidateIsLogNormal(soilLayer.AbovePhreaticLevelDistribution, + Resources.SoilLayerProperties_AbovePhreaticLevelDistribution_Description); + ValidateIsLogNormal( soilLayer.BelowPhreaticLevelDistribution, Resources.SoilLayerProperties_BelowPhreaticLevelDistribution_Description); @@ -219,6 +223,14 @@ Resources.SoilLayerProperties_PopDistribution_Description); } + /// + /// Validates if the distribution is a non-shifted log normal distribution. + /// + /// The distribution type. + /// The value of the shift. + /// The name of the parameter to be validated. + /// Thrown when the parameter is not a + /// non-shifted log normal distribution. private static void ValidateIsNonShiftedLogNormal(long? distribution, double shift, string incorrectDistibutionParameter) { if (distribution.HasValue && (distribution.Value != SoilLayerConstants.LogNormalDistributionValue @@ -230,6 +242,13 @@ } } + /// + /// Validates if the distribution is a log normal distribution. + /// + /// The distribution type. + /// The name of the parameter to be validated. + /// Thrown when the parameter is not a + /// log-normal distribution. private static void ValidateIsLogNormal(long? distribution, string incorrectDistibutionParameter) { if (distribution.HasValue && distribution != SoilLayerConstants.LogNormalDistributionValue) Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilModelFilter.cs =================================================================== diff -u -r053147673eaa4012f8a4e1b3759a7bb5cd0c4634 -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilModelFilter.cs (.../MacroStabilityInwardsStochasticSoilModelFilter.cs) (revision 053147673eaa4012f8a4e1b3759a7bb5cd0c4634) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilModelFilter.cs (.../MacroStabilityInwardsStochasticSoilModelFilter.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -26,7 +26,7 @@ namespace Ringtoets.MacroStabilityInwards.IO.SoilProfiles { /// - /// Class to that can be used to filter stochastic soil models for the macro stability inwards failure mechanism. + /// Class that can be used to filter stochastic soil models for the macro stability inwards failure mechanism. /// public class MacroStabilityInwardsStochasticSoilModelFilter : IStochasticSoilModelMechanismFilter { Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformer.cs =================================================================== diff -u -re46922a39166f62578f01b338db68a820a5fd448 -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformer.cs (.../MacroStabilityInwardsStochasticSoilModelTransformer.cs) (revision e46922a39166f62578f01b338db68a820a5fd448) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformer.cs (.../MacroStabilityInwardsStochasticSoilModelTransformer.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -73,7 +73,7 @@ return stochasticSoilProfiles.Select( ssp => MacroStabilityInwardsStochasticSoilProfileTransformer.Transform( ssp, - GetTransformedSoilProfile(ssp.SoilProfile))); + GetTransformedSoilProfile(ssp.SoilProfile))).ToArray(); } /// Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilProfileTransformer.cs =================================================================== diff -u -r8cbe9f4263082b2a7199fa4643f32a09b025d2ec -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilProfileTransformer.cs (.../MacroStabilityInwardsStochasticSoilProfileTransformer.cs) (revision 8cbe9f4263082b2a7199fa4643f32a09b025d2ec) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsStochasticSoilProfileTransformer.cs (.../MacroStabilityInwardsStochasticSoilProfileTransformer.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -34,7 +34,7 @@ { /// /// Transforms the generic into - /// . + /// . /// /// The stochastic soil profile to use /// in the transformation. Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayerProperties.cs =================================================================== diff -u -r42357a100d1a75baca233aa44b866a5009f48e00 -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayerProperties.cs (.../MacroStabilityInwardsSoilLayerProperties.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayerProperties.cs (.../MacroStabilityInwardsSoilLayerProperties.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -116,12 +116,6 @@ public double CohesionDeviation { get; set; } = double.NaN; /// - /// Gets or sets the shift of the distribution for the cohesion. - /// [kN/m³] - /// - public double CohesionShift { get; set; } = double.NaN; - - /// /// Gets or sets the mean of the distribution for the friction angle /// [°] /// @@ -134,12 +128,6 @@ public double FrictionAngleDeviation { get; set; } = double.NaN; /// - /// Gets or sets the shift of the distribution for the friction angle. - /// [°] - /// - public double FrictionAngleShift { get; set; } = double.NaN; - - /// /// Gets or sets the mean of the distribution for the ratio of shear strength S /// [-] /// @@ -152,12 +140,6 @@ public double ShearStrengthRatioDeviation { get; set; } = double.NaN; /// - /// Gets or sets the shift of the distribution for the ratio of shear strength S. - /// [-] - /// - public double ShearStrengthRatioShift { get; set; } = double.NaN; - - /// /// Gets or sets the mean of the distribution for the strength increase exponent (m) /// [-] /// @@ -170,12 +152,6 @@ public double StrengthIncreaseExponentDeviation { get; set; } = double.NaN; /// - /// Gets or sets the shift of the distribution for the strength increase exponent (m). - /// [-] - /// - public double StrengthIncreaseExponentShift { get; set; } = double.NaN; - - /// /// Gets or sets the mean of the distribution for the POP /// [kN/m²] /// @@ -187,12 +163,6 @@ /// public double PopDeviation { get; set; } = double.NaN; - /// - /// Gets or sets the shift of the distribution for the POP. - /// [kN/m²] - /// - public double PopShift { get; set; } = double.NaN; - public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; @@ -216,19 +186,14 @@ hashCode = (hashCode * 397) ^ BelowPhreaticLevelDeviation.GetHashCode(); hashCode = (hashCode * 397) ^ CohesionMean.GetHashCode(); hashCode = (hashCode * 397) ^ CohesionDeviation.GetHashCode(); - hashCode = (hashCode * 397) ^ CohesionShift.GetHashCode(); hashCode = (hashCode * 397) ^ FrictionAngleMean.GetHashCode(); hashCode = (hashCode * 397) ^ FrictionAngleDeviation.GetHashCode(); - hashCode = (hashCode * 397) ^ FrictionAngleShift.GetHashCode(); hashCode = (hashCode * 397) ^ ShearStrengthRatioMean.GetHashCode(); hashCode = (hashCode * 397) ^ ShearStrengthRatioDeviation.GetHashCode(); - hashCode = (hashCode * 397) ^ ShearStrengthRatioShift.GetHashCode(); hashCode = (hashCode * 397) ^ StrengthIncreaseExponentMean.GetHashCode(); hashCode = (hashCode * 397) ^ StrengthIncreaseExponentDeviation.GetHashCode(); - hashCode = (hashCode * 397) ^ StrengthIncreaseExponentShift.GetHashCode(); hashCode = (hashCode * 397) ^ PopMean.GetHashCode(); hashCode = (hashCode * 397) ^ PopDeviation.GetHashCode(); - hashCode = (hashCode * 397) ^ PopShift.GetHashCode(); return hashCode; } } @@ -246,19 +211,14 @@ && BelowPhreaticLevelDeviation.Equals(other.BelowPhreaticLevelDeviation) && CohesionMean.Equals(other.CohesionMean) && CohesionDeviation.Equals(other.CohesionDeviation) - && CohesionShift.Equals(other.CohesionShift) && FrictionAngleMean.Equals(other.FrictionAngleMean) && FrictionAngleDeviation.Equals(other.FrictionAngleDeviation) - && FrictionAngleShift.Equals(other.FrictionAngleShift) && ShearStrengthRatioMean.Equals(other.ShearStrengthRatioMean) && ShearStrengthRatioDeviation.Equals(other.ShearStrengthRatioDeviation) - && ShearStrengthRatioShift.Equals(other.ShearStrengthRatioShift) && StrengthIncreaseExponentMean.Equals(other.StrengthIncreaseExponentMean) && StrengthIncreaseExponentDeviation.Equals(other.StrengthIncreaseExponentDeviation) - && StrengthIncreaseExponentShift.Equals(other.StrengthIncreaseExponentShift) && PopMean.Equals(other.PopMean) - && PopDeviation.Equals(other.PopDeviation) - && PopShift.Equals(other.PopShift); + && PopDeviation.Equals(other.PopDeviation); } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs =================================================================== diff -u -re14d435cf9328ecd215e94bd3a34f126b2885e6d -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs (.../MacroStabilityInwardsSoilLayerTransformerTest.cs) (revision e14d435cf9328ecd215e94bd3a34f126b2885e6d) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs (.../MacroStabilityInwardsSoilLayerTransformerTest.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -140,7 +140,7 @@ } [Test] - public void SoilLayer1DTransform_InvalidUsePopValue_ReturnMacroStabilityInwardSoilLayer1D() + public void SoilLayer1DTransform_InvalidUsePopValue_ThrowsImportedDataTransformationException() { // Setup var layer = new SoilLayer1D(0) @@ -195,24 +195,19 @@ } [Test] - public void SoilLayer1DTransform_IncorrectShiftedLogNormalDistribution_ThrowsImportedDataTransformException() + [TestCaseSource(nameof(IncorrectShiftedLogNormalDistributionsSoilLayer1D))] + public void SoilLayer1DTransform_IncorrectShiftedLogNormalDistribution_ThrowsImportedDataTransformException(SoilLayer1D layer, string parameter) { - // Setup - var layer = new SoilLayer1D(0.0) - { - BelowPhreaticLevelDistribution = -1 - }; - // Call TestDelegate test = () => MacroStabilityInwardsSoilLayerTransformer.Transform(layer); // Assert Exception exception = Assert.Throws(test); - Assert.AreEqual("Parameter 'Verzadigd gewicht' is niet verschoven lognormaal verdeeld.", exception.Message); + Assert.AreEqual($"Parameter '{parameter}' is niet verschoven lognormaal verdeeld.", exception.Message); } [Test] - [TestCaseSource(nameof(IncorrectLogNormalDistributionsSoilLayer1D))] + [TestCaseSource(nameof(IncorrectNonShiftedLogNormalDistributionsSoilLayer1D))] public void SoilLayer1DTransform_IncorrectLogNormalDistribution_ThrowImportedDataTransformException(SoilLayer1D layer, string parameter) { // Call @@ -370,24 +365,20 @@ } [Test] - public void SoilLayer2DTransform_IncorrectShiftedLogNormalDistribution_ThrowsImportedDataTransformException() + [TestCaseSource(nameof(IncorrectShiftedLogNormalDistributionsSoilLayer2D))] + public void SoilLayer2DTransform_IncorrectShiftedLogNormalDistribution_ThrowsImportedDataTransformException( + SoilLayer2D layer, string parameter) { - // Setup - var layer = new SoilLayer2D - { - BelowPhreaticLevelDistribution = -1 - }; - // Call TestDelegate test = () => MacroStabilityInwardsSoilLayerTransformer.Transform(layer); // Assert Exception exception = Assert.Throws(test); - Assert.AreEqual("Parameter 'Verzadigd gewicht' is niet verschoven lognormaal verdeeld.", exception.Message); + Assert.AreEqual($"Parameter '{parameter}' is niet verschoven lognormaal verdeeld.", exception.Message); } [Test] - [TestCaseSource(nameof(IncorrectLogNormalDistributionsSoilLayer2D))] + [TestCaseSource(nameof(IncorrectNonShiftedLogNormalDistributionsSoilLayer2D))] public void SoilLayer2DTransform_IncorrectLogNormalDistribution_ThrowImportedDataTransformException(SoilLayer2D layer, string parameter) { // Call @@ -428,19 +419,50 @@ return new Ring(points.Distinct()); } - private static IEnumerable IncorrectLogNormalDistributionsSoilLayer1D() + #region Test Data: Shifted Log Normal Distributions + + private static IEnumerable IncorrectShiftedLogNormalDistributionsSoilLayer1D() { - return IncorrectLogNormalDistributions(() => new SoilLayer1D(0.0), nameof(SoilLayer1D)); + return IncorrectShiftedLogNormalDistributions(() => new SoilLayer1D(0.0), nameof(SoilLayer1D)); } - private static IEnumerable IncorrectLogNormalDistributionsSoilLayer2D() + private static IEnumerable IncorrectShiftedLogNormalDistributionsSoilLayer2D() { - return IncorrectLogNormalDistributions(() => new SoilLayer2D(), nameof(SoilLayer1D)); + return IncorrectShiftedLogNormalDistributions(() => new SoilLayer2D(), nameof(SoilLayer2D)); } - private static IEnumerable IncorrectLogNormalDistributions(Func soilLayer, string typeName) + private static IEnumerable IncorrectShiftedLogNormalDistributions(Func soilLayer, string typeName) { const string testNameFormat = "{0}Transform_Incorrect{1}{{1}}_ThrowsImportedDataTransformException"; + + SoilLayerBase invalidBelowPhreaticLevel = soilLayer(); + invalidBelowPhreaticLevel.BelowPhreaticLevelDistribution = -1; + yield return new TestCaseData(invalidBelowPhreaticLevel, "Verzadigd gewicht") + .SetName(string.Format(testNameFormat, typeName, "Distribution")); + + SoilLayerBase invalidAbovePhreaticLevel = soilLayer(); + invalidAbovePhreaticLevel.AbovePhreaticLevelDistribution = -1; + yield return new TestCaseData(invalidAbovePhreaticLevel, "Onverzadigd gewicht") + .SetName(string.Format(testNameFormat, typeName, "Distribution")); + } + + #endregion + + #region Test Data:NonShifted Log Normal Distributions + + private static IEnumerable IncorrectNonShiftedLogNormalDistributionsSoilLayer1D() + { + return IncorrectNonShiftedLogNormalDistributions(() => new SoilLayer1D(0.0), nameof(SoilLayer1D)); + } + + private static IEnumerable IncorrectNonShiftedLogNormalDistributionsSoilLayer2D() + { + return IncorrectNonShiftedLogNormalDistributions(() => new SoilLayer2D(), nameof(SoilLayer2D)); + } + + private static IEnumerable IncorrectNonShiftedLogNormalDistributions(Func soilLayer, string typeName) + { + const string testNameFormat = "{0}Transform_Incorrect{1}{{1}}_ThrowsImportedDataTransformException"; const long validDistribution = SoilLayerConstants.LogNormalDistributionValue; const double validShift = 0.0; @@ -504,5 +526,7 @@ yield return new TestCaseData(invalidPopDistribution, "POP" ).SetName(string.Format(testNameFormat, typeName, "Distribution")); } + + #endregion } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelFilterTest.cs =================================================================== diff -u -r053147673eaa4012f8a4e1b3759a7bb5cd0c4634 -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelFilterTest.cs (.../MacroStabilityInwardsStochasticSoilModelFilterTest.cs) (revision 053147673eaa4012f8a4e1b3759a7bb5cd0c4634) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelFilterTest.cs (.../MacroStabilityInwardsStochasticSoilModelFilterTest.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -33,7 +33,7 @@ public class MacroStabilityInwardsStochasticSoilModelFilterTest { [Test] - public void Constructor_StochasticSoilModelNull_ThrowsArgumentNullException() + public void IsValidForFailureMechanism_StochasticSoilModelNull_ThrowsArgumentNullException() { // Setup var filter = new MacroStabilityInwardsStochasticSoilModelFilter(); @@ -48,7 +48,7 @@ [Test] [TestCaseSource(nameof(StochasticSoilModelsOfInvalidType))] - public void Constructor_StochasticSoilModelOfInvalidType_ReturnsFalse(StochasticSoilModel model) + public void IsValidForFailureMechanism_StochasticSoilModelOfInvalidType_ReturnsFalse(StochasticSoilModel model) { // Setup var filter = new MacroStabilityInwardsStochasticSoilModelFilter(); @@ -61,7 +61,7 @@ } [Test] - public void Constructor_ValidStochasticSoilModelType_ReturnsFalse() + public void IsValidForFailureMechanism_ValidStochasticSoilModelType_ReturnsFalse() { // Setup var filter = new MacroStabilityInwardsStochasticSoilModelFilter(); @@ -82,7 +82,7 @@ .Select(type => new TestCaseData( new StochasticSoilModel(type.ToString(), type)) .SetName($"Constructor_InvalidType_ReturnsFalse({type.ToString()})") - ); + ).ToArray(); } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs =================================================================== diff -u -rd0df72045ade55bd857dae6333ec4e1532ab4593 -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs (.../MacroStabilityInwardsStochasticSoilModelTransformerTest.cs) (revision d0df72045ade55bd857dae6333ec4e1532ab4593) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsStochasticSoilModelTransformerTest.cs (.../MacroStabilityInwardsStochasticSoilModelTransformerTest.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -166,7 +166,7 @@ } [Test] - public void Transform_TwoStochasticSoilModelsWithSameProfile_ReturnExepctedMacroStabilityInwardsStochasticSoilModel() + public void Transform_TwoStochasticSoilModelsWithSameProfile_ReturnExpectedMacroStabilityInwardsStochasticSoilModel() { // Setup SoilLayer2D layer = SoilLayer2DTestFactory.CreateSoilLayer2D(); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilLayerPropertiesTest.cs =================================================================== diff -u -rc85b5e367887a96d602dfb7a0b46073b6eef84da -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilLayerPropertiesTest.cs (.../MacroStabilityInwardsSoilLayerPropertiesTest.cs) (revision c85b5e367887a96d602dfb7a0b46073b6eef84da) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilLayerPropertiesTest.cs (.../MacroStabilityInwardsSoilLayerPropertiesTest.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -53,23 +53,18 @@ Assert.IsNaN(properties.CohesionMean); Assert.IsNaN(properties.CohesionDeviation); - Assert.IsNaN(properties.CohesionShift); Assert.IsNaN(properties.FrictionAngleMean); Assert.IsNaN(properties.FrictionAngleDeviation); - Assert.IsNaN(properties.FrictionAngleShift); Assert.IsNaN(properties.ShearStrengthRatioMean); Assert.IsNaN(properties.ShearStrengthRatioDeviation); - Assert.IsNaN(properties.ShearStrengthRatioShift); Assert.IsNaN(properties.StrengthIncreaseExponentMean); Assert.IsNaN(properties.StrengthIncreaseExponentDeviation); - Assert.IsNaN(properties.StrengthIncreaseExponentShift); Assert.IsNaN(properties.PopMean); Assert.IsNaN(properties.PopDeviation); - Assert.IsNaN(properties.PopShift); } [Test] @@ -188,19 +183,14 @@ yield return new TestCaseData(new Action(lp => lp.BelowPhreaticLevelDeviation = 1.0 - lp.BelowPhreaticLevelDeviation)); yield return new TestCaseData(new Action(lp => lp.CohesionMean = 1.0 - lp.CohesionMean)); yield return new TestCaseData(new Action(lp => lp.CohesionDeviation = 1.0 - lp.CohesionDeviation)); - yield return new TestCaseData(new Action(lp => lp.CohesionShift = 1.0 - lp.CohesionShift)); yield return new TestCaseData(new Action(lp => lp.FrictionAngleMean = 1.0 - lp.FrictionAngleMean)); yield return new TestCaseData(new Action(lp => lp.FrictionAngleDeviation = 1.0 - lp.FrictionAngleDeviation)); - yield return new TestCaseData(new Action(lp => lp.FrictionAngleShift = 1.0 - lp.FrictionAngleShift)); yield return new TestCaseData(new Action(lp => lp.ShearStrengthRatioMean = 1.0 - lp.ShearStrengthRatioMean)); yield return new TestCaseData(new Action(lp => lp.ShearStrengthRatioDeviation = 1.0 - lp.ShearStrengthRatioDeviation)); - yield return new TestCaseData(new Action(lp => lp.ShearStrengthRatioShift = 1.0 - lp.ShearStrengthRatioShift)); yield return new TestCaseData(new Action(lp => lp.StrengthIncreaseExponentMean = 1.0 - lp.StrengthIncreaseExponentMean)); yield return new TestCaseData(new Action(lp => lp.StrengthIncreaseExponentDeviation = 1.0 - lp.StrengthIncreaseExponentDeviation)); - yield return new TestCaseData(new Action(lp => lp.StrengthIncreaseExponentShift = 1.0 - lp.StrengthIncreaseExponentShift)); yield return new TestCaseData(new Action(lp => lp.PopMean = 1.0 - lp.PopMean)); yield return new TestCaseData(new Action(lp => lp.PopDeviation = 1.0 - lp.PopDeviation)); - yield return new TestCaseData(new Action(lp => lp.PopShift = 1.0 - lp.PopShift)); } private static TestCaseData[] PropertiesCombinations() @@ -255,19 +245,14 @@ BelowPhreaticLevelDeviation = random.NextDouble(), CohesionMean = random.NextDouble(), CohesionDeviation = random.NextDouble(), - CohesionShift = random.NextDouble(), FrictionAngleMean = random.NextDouble(), FrictionAngleDeviation = random.NextDouble(), - FrictionAngleShift = random.NextDouble(), ShearStrengthRatioMean = random.NextDouble(), ShearStrengthRatioDeviation = random.NextDouble(), - ShearStrengthRatioShift = random.NextDouble(), StrengthIncreaseExponentMean = random.NextDouble(), StrengthIncreaseExponentDeviation = random.NextDouble(), - StrengthIncreaseExponentShift = random.NextDouble(), PopMean = random.NextDouble(), PopDeviation = random.NextDouble(), - PopShift = random.NextDouble() }; } } Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingStochasticSoilModelFilter.cs =================================================================== diff -u -rdaa6b36fc2506683c50ba4117790452ae4f45d7f -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingStochasticSoilModelFilter.cs (.../PipingStochasticSoilModelFilter.cs) (revision daa6b36fc2506683c50ba4117790452ae4f45d7f) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfiles/PipingStochasticSoilModelFilter.cs (.../PipingStochasticSoilModelFilter.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -26,7 +26,7 @@ namespace Ringtoets.Piping.IO.SoilProfiles { /// - /// Class to that can be used to filter stochastic soil models for the piping failure mechanism. + /// Class that can be used to filter stochastic soil models for the piping failure mechanism. /// public class PipingStochasticSoilModelFilter : IStochasticSoilModelMechanismFilter { Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilModelFilterTest.cs =================================================================== diff -u -rdaa6b36fc2506683c50ba4117790452ae4f45d7f -r9622873faf35255d36a4543501d4788baa399af7 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilModelFilterTest.cs (.../PipingStochasticSoilModelFilterTest.cs) (revision daa6b36fc2506683c50ba4117790452ae4f45d7f) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfiles/PipingStochasticSoilModelFilterTest.cs (.../PipingStochasticSoilModelFilterTest.cs) (revision 9622873faf35255d36a4543501d4788baa399af7) @@ -33,7 +33,7 @@ public class PipingStochasticSoilModelFilterTest { [Test] - public void Constructor_StochasticSoilModelNull_ThrowsArgumentNullException() + public void IsValidForFailureMechanism_StochasticSoilModelNull_ThrowsArgumentNullException() { // Setup var filter = new PipingStochasticSoilModelFilter(); @@ -48,7 +48,7 @@ [Test] [TestCaseSource(nameof(StochasticSoilModelsOfInvalidType))] - public void Constructor_StochasticSoilModelOfInvalidType_ReturnsFalse(StochasticSoilModel model) + public void IsValidForFailureMechanism_StochasticSoilModelOfInvalidType_ReturnsFalse(StochasticSoilModel model) { // Setup var filter = new PipingStochasticSoilModelFilter(); @@ -61,7 +61,7 @@ } [Test] - public void Constructor_ValidStochasticSoilModelType_ReturnsFalse() + public void IsValidForFailureMechanism_ValidStochasticSoilModelType_ReturnsFalse() { // Setup var filter = new PipingStochasticSoilModelFilter(); @@ -82,7 +82,7 @@ .Select(type => new TestCaseData( new StochasticSoilModel(type.ToString(), type)) .SetName($"Constructor_InvalidType_ReturnsFalse({type.ToString()})") - ); + ).ToArray(); } } } \ No newline at end of file