Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsSoilCreatorTest.cs =================================================================== diff -u -r708bcebfe9e5db209c818a12d630cb418231f863 -r739cf596f79acc842ee61e885220a8022f3cdedf --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsSoilCreatorTest.cs (.../MacroStabilityInwardsSoilCreatorTest.cs) (revision 708bcebfe9e5db209c818a12d630cb418231f863) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsSoilCreatorTest.cs (.../MacroStabilityInwardsSoilCreatorTest.cs) (revision 739cf596f79acc842ee61e885220a8022f3cdedf) @@ -23,6 +23,7 @@ using System.Linq; using Deltares.WTIStability.Data.Geo; using NUnit.Framework; +using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.MacroStabilityInwards.Primitives; using Point2D = Core.Common.Base.Geometry.Point2D; @@ -41,42 +42,54 @@ { new Point2D(0, 0), new Point2D(1, 1) - }, new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties - { - UsePop = true, - ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.CPhi, - MaterialName = "Sand" - })), + }, new TestMacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( + new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + { + UsePop = true, + ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.CPhi, + MaterialName = "Sand", + AbovePhreaticLevelMean = 0.1, + AbovePhreaticLevelCoefficientOfVariation = 0.7 + })), new MacroStabilityInwardsSoilLayerUnderSurfaceLine(new[] { new Point2D(0, 0), new Point2D(1, 1) - }, new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties - { - UsePop = false, - ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.None, - MaterialName = "Mud" - })), + }, new TestMacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( + new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + { + UsePop = false, + ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.None, + MaterialName = "Mud", + AbovePhreaticLevelMean = 0.2, + AbovePhreaticLevelCoefficientOfVariation = 0.6 + })), new MacroStabilityInwardsSoilLayerUnderSurfaceLine(new[] { new Point2D(0, 0), new Point2D(1, 1) - }, new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties - { - UsePop = true, - ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.CPhiOrSuCalculated, - MaterialName = "Clay" - })), + }, new TestMacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( + new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + { + UsePop = true, + ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.CPhiOrSuCalculated, + MaterialName = "Clay", + AbovePhreaticLevelMean = 0.3, + AbovePhreaticLevelCoefficientOfVariation = 0.5 + })), new MacroStabilityInwardsSoilLayerUnderSurfaceLine(new[] { new Point2D(0, 0), new Point2D(1, 1) - }, new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties - { - UsePop = true, - ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.SuCalculated, - MaterialName = "Grass" - })) + }, new TestMacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( + new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + { + UsePop = true, + ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.SuCalculated, + MaterialName = "Grass", + AbovePhreaticLevelMean = 0.4, + AbovePhreaticLevelCoefficientOfVariation = 0.4 + })) }); // Call @@ -92,23 +105,27 @@ ShearStrengthModel.CPhi, ShearStrengthModel.None, ShearStrengthModel.CPhiOrCuCalculated, - ShearStrengthModel.CuCalculated, + ShearStrengthModel.CuCalculated }, soils.Select(s => s.ShearStrengthModel)); + CollectionAssert.AreEqual(profile.LayersUnderSurfaceLine + .Select(l => MacroStabilityInwardsSemiProbabilisticDesignValueFactory.GetAbovePhreaticLevel(l.Properties) + .GetDesignValue().Value), + soils.Select(s => s.AbovePhreaticLevel)); } [Test] public void Create_InvalidShearStrengthModel_ThrowNotSupportedException() { // Setup var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(new[] - { + { new MacroStabilityInwardsSoilLayerUnderSurfaceLine(new[] { new Point2D(0, 0), new Point2D(1, 1) }, new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties { - ShearStrengthModel = (MacroStabilityInwardsShearStrengthModel) 99, + ShearStrengthModel = (MacroStabilityInwardsShearStrengthModel) 99 })) }); @@ -118,5 +135,15 @@ // Assert Assert.Throws(test); } + + private class TestMacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine : MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine + { + public TestMacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(ConstructionProperties properties) + : base(properties) + { + AbovePhreaticLevelDesignVariable = MacroStabilityInwardsSemiProbabilisticDesignValueFactory.GetAbovePhreaticLevel(this) + .GetDesignValue(); + } + } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj =================================================================== diff -u -re53ef4c278a378cb5b3973dc939a19896f94b1cc -r739cf596f79acc842ee61e885220a8022f3cdedf --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision e53ef4c278a378cb5b3973dc939a19896f94b1cc) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision 739cf596f79acc842ee61e885220a8022f3cdedf) @@ -81,6 +81,10 @@ {d4200f43-3f72-4f42-af0a-8ced416a38ec} Ringtoets.Common.Data + + {83D6B73E-91D5-46B0-9218-955DA1F75F7C} + Ringtoets.MacroStabilityInwards.Data + {3c0d3b38-a9f7-4b22-9705-513da26ae2cc} Ringtoets.MacroStabilityInwards.KernelWrapper