Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs =================================================================== diff -u -r4e0b333b9e7d89ba6563e1b2f9cb011c92c8015f -r602aa9de93c40ec9ca76e79530d13e7e32b45151 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs (.../MacroStabilityInwardsSoilLayerTransformer.cs) (revision 4e0b333b9e7d89ba6563e1b2f9cb011c92c8015f) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/SoilProfiles/MacroStabilityInwardsSoilLayerTransformer.cs (.../MacroStabilityInwardsSoilLayerTransformer.cs) (revision 602aa9de93c40ec9ca76e79530d13e7e32b45151) @@ -23,8 +23,6 @@ using Ringtoets.Common.IO.Exceptions; using Ringtoets.Common.IO.SoilProfile; using Ringtoets.MacroStabilityInwards.Primitives; -using CommonShearStrengthModel = Ringtoets.Common.IO.SoilProfile.ShearStrengthModel; -using ShearStrengthModel = Ringtoets.MacroStabilityInwards.Primitives.ShearStrengthModel; namespace Ringtoets.MacroStabilityInwards.IO.SoilProfiles { @@ -94,24 +92,24 @@ } /// - /// Transforms the to . + /// Transforms the to . /// /// The model to transform. - /// A based on the given data. + /// A based on the given data. /// Thrown when /// has an invalid value. - private static ShearStrengthModel TransformShearStrengthModel(CommonShearStrengthModel shearStrengthModel) + private static MacroStabilityInwardsShearStrengthModel TransformShearStrengthModel(ShearStrengthModel shearStrengthModel) { switch (shearStrengthModel) { - case CommonShearStrengthModel.None: - return ShearStrengthModel.None; - case CommonShearStrengthModel.SuCalculated: - return ShearStrengthModel.SuCalculated; - case CommonShearStrengthModel.CPhi: - return ShearStrengthModel.CPhi; - case CommonShearStrengthModel.CPhiOrSuCalculated: - return ShearStrengthModel.CPhiOrSuCalculated; + case ShearStrengthModel.None: + return MacroStabilityInwardsShearStrengthModel.None; + case ShearStrengthModel.SuCalculated: + return MacroStabilityInwardsShearStrengthModel.SuCalculated; + case ShearStrengthModel.CPhi: + return MacroStabilityInwardsShearStrengthModel.CPhi; + case ShearStrengthModel.CPhiOrSuCalculated: + return MacroStabilityInwardsShearStrengthModel.CPhiOrSuCalculated; default: throw new NotSupportedException(); } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsShearStrengthModel.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsShearStrengthModel.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsShearStrengthModel.cs (revision 602aa9de93c40ec9ca76e79530d13e7e32b45151) @@ -0,0 +1,34 @@ +// 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. + +namespace Ringtoets.MacroStabilityInwards.Primitives +{ + /// + /// All shear strength model types. + /// + public enum MacroStabilityInwardsShearStrengthModel + { + None = 1, + SuCalculated = 2, + CPhi = 3, + CPhiOrSuCalculated = 4 + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/Ringtoets.MacroStabilityInwards.Primitives.csproj =================================================================== diff -u -r620846e4cf00b13e9310c931d29bac47799a81d8 -r602aa9de93c40ec9ca76e79530d13e7e32b45151 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/Ringtoets.MacroStabilityInwards.Primitives.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.csproj) (revision 620846e4cf00b13e9310c931d29bac47799a81d8) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/Ringtoets.MacroStabilityInwards.Primitives.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.csproj) (revision 602aa9de93c40ec9ca76e79530d13e7e32b45151) @@ -55,7 +55,7 @@ - + Fisheye: Tag 602aa9de93c40ec9ca76e79530d13e7e32b45151 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/ShearStrengthModel.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/SoilLayerProperties.cs =================================================================== diff -u -r133ab46a14ee9508c8dd5e4f82381da606076ae0 -r602aa9de93c40ec9ca76e79530d13e7e32b45151 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/SoilLayerProperties.cs (.../SoilLayerProperties.cs) (revision 133ab46a14ee9508c8dd5e4f82381da606076ae0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/SoilLayerProperties.cs (.../SoilLayerProperties.cs) (revision 602aa9de93c40ec9ca76e79530d13e7e32b45151) @@ -32,6 +32,14 @@ private string materialName = string.Empty; /// + /// Creates a new instance of . + /// + public SoilLayerProperties() + { + ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.None; + } + + /// /// Gets or sets a value indicating whether the layer is an aquifer. /// public bool IsAquifer { get; set; } @@ -69,7 +77,7 @@ /// /// Gets or sets the shear strength model to use for the layer. /// - public ShearStrengthModel ShearStrengthModel { get; set; } + public MacroStabilityInwardsShearStrengthModel ShearStrengthModel { get; set; } /// /// Gets or sets the mean of the distribution for the volumic weight of the layer above the phreatic level. Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs =================================================================== diff -u -r4e0b333b9e7d89ba6563e1b2f9cb011c92c8015f -r602aa9de93c40ec9ca76e79530d13e7e32b45151 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs (.../MacroStabilityInwardsSoilLayerTransformerTest.cs) (revision 4e0b333b9e7d89ba6563e1b2f9cb011c92c8015f) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/SoilProfiles/MacroStabilityInwardsSoilLayerTransformerTest.cs (.../MacroStabilityInwardsSoilLayerTransformerTest.cs) (revision 602aa9de93c40ec9ca76e79530d13e7e32b45151) @@ -27,8 +27,6 @@ using Ringtoets.Common.IO.SoilProfile; using Ringtoets.MacroStabilityInwards.IO.SoilProfiles; using Ringtoets.MacroStabilityInwards.Primitives; -using CommonShearStrengthModel = Ringtoets.Common.IO.SoilProfile.ShearStrengthModel; -using ShearStrengthModel = Ringtoets.MacroStabilityInwards.Primitives.ShearStrengthModel; namespace Ringtoets.MacroStabilityInwards.IO.Test.SoilProfiles { @@ -57,7 +55,7 @@ const string materialName = "materialX"; Color color = Color.AliceBlue; bool usePop = random.NextBoolean(); - var shearStrengthModel = random.NextEnumValue(); + var shearStrengthModel = random.NextEnumValue(); double abovePhreaticLevelMean = random.NextDouble(); double abovePhreaticLevelDeviation = random.NextDouble(); @@ -146,7 +144,7 @@ // Setup var layer = new SoilLayer1D(1) { - ShearStrengthModel = (CommonShearStrengthModel) 99 + ShearStrengthModel = (ShearStrengthModel) 99 }; // Call @@ -158,18 +156,18 @@ Assert.IsInstanceOf(exception.InnerException); } - private ShearStrengthModel GetMacroStabilityInwardsShearStrengthModel(CommonShearStrengthModel shearStrengthModel) + private MacroStabilityInwardsShearStrengthModel GetMacroStabilityInwardsShearStrengthModel(ShearStrengthModel shearStrengthModel) { switch (shearStrengthModel) { - case CommonShearStrengthModel.None: - return ShearStrengthModel.None; - case CommonShearStrengthModel.SuCalculated: - return ShearStrengthModel.SuCalculated; - case CommonShearStrengthModel.CPhi: - return ShearStrengthModel.CPhi; - case CommonShearStrengthModel.CPhiOrSuCalculated: - return ShearStrengthModel.CPhiOrSuCalculated; + case ShearStrengthModel.None: + return MacroStabilityInwardsShearStrengthModel.None; + case ShearStrengthModel.SuCalculated: + return MacroStabilityInwardsShearStrengthModel.SuCalculated; + case ShearStrengthModel.CPhi: + return MacroStabilityInwardsShearStrengthModel.CPhi; + case ShearStrengthModel.CPhiOrSuCalculated: + return MacroStabilityInwardsShearStrengthModel.CPhiOrSuCalculated; default: throw new ArgumentOutOfRangeException(nameof(shearStrengthModel), shearStrengthModel, null); } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/SoilLayerPropertiesTest.cs =================================================================== diff -u -r11770f197071c45397a34ec91fc3981acf05c850 -r602aa9de93c40ec9ca76e79530d13e7e32b45151 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/SoilLayerPropertiesTest.cs (.../SoilLayerPropertiesTest.cs) (revision 11770f197071c45397a34ec91fc3981acf05c850) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/SoilLayerPropertiesTest.cs (.../SoilLayerPropertiesTest.cs) (revision 602aa9de93c40ec9ca76e79530d13e7e32b45151) @@ -43,7 +43,7 @@ Assert.AreEqual(Color.Empty, properties.Color); Assert.IsFalse(properties.UsePop); - Assert.AreEqual(ShearStrengthModel.None, properties.ShearStrengthModel); + Assert.AreEqual(MacroStabilityInwardsShearStrengthModel.None, properties.ShearStrengthModel); Assert.IsNaN(properties.AbovePhreaticLevelMean); Assert.IsNaN(properties.AbovePhreaticLevelDeviation); @@ -177,7 +177,7 @@ private static IEnumerable ChangeSingleProperties() { - yield return new TestCaseData(new Action(lp => lp.ShearStrengthModel = (ShearStrengthModel) 9)); + yield return new TestCaseData(new Action(lp => lp.ShearStrengthModel = (MacroStabilityInwardsShearStrengthModel) 9)); yield return new TestCaseData(new Action(lp => lp.MaterialName = "interesting")); yield return new TestCaseData(new Action(lp => lp.IsAquifer = !lp.IsAquifer)); yield return new TestCaseData(new Action(lp => lp.UsePop = !lp.UsePop)); @@ -248,7 +248,7 @@ Color = Color.FromKnownColor(random.NextEnumValue()), IsAquifer = random.NextBoolean(), UsePop = random.NextBoolean(), - ShearStrengthModel = random.NextEnumValue(), + ShearStrengthModel = random.NextEnumValue(), AbovePhreaticLevelMean = random.NextDouble(), AbovePhreaticLevelDeviation = random.NextDouble(), BelowPhreaticLevelMean = random.NextDouble(),