Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilLayer.cs =================================================================== diff -u -raf2df89e0e5626a73bbf8d964291ce23085f61e2 -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilLayer.cs (.../SoilLayer.cs) (revision af2df89e0e5626a73bbf8d964291ce23085f61e2) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilLayer.cs (.../SoilLayer.cs) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -168,7 +168,7 @@ StrengthIncreaseExponent = double.NaN; ShearStrengthRatio = double.NaN; Pop = double.NaN; - Dilatancy = 0.0; + Dilatancy = double.NaN; WaterPressureInterpolationModel = WaterPressureInterpolationModel.Automatic; } Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Calculators/Waternet/WaternetCalculator.cs =================================================================== diff -u -r3ab5eb5e03ed76e5deeafede59187a5fbc41c31c -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Calculators/Waternet/WaternetCalculator.cs (.../WaternetCalculator.cs) (revision 3ab5eb5e03ed76e5deeafede59187a5fbc41c31c) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Calculators/Waternet/WaternetCalculator.cs (.../WaternetCalculator.cs) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -107,16 +107,12 @@ private IWaternetKernel GetWaternetKernel() { IWaternetKernel waternetKernel = CreateWaternetKernel(WaternetLocationCreator.Create(Input)); - SetInputOnKernel(waternetKernel); - return waternetKernel; - } - - private void SetInputOnKernel(IWaternetKernel waternetKernel) - { + LayerWithSoil[] layersWithSoil = LayerWithSoilCreator.Create(Input.SoilProfile, out IDictionary _); - waternetKernel.SetSoilProfile(SoilProfileCreator.Create(layersWithSoil)); waternetKernel.SetSurfaceLine(SurfaceLineCreator.Create(Input.SurfaceLine)); + + return waternetKernel; } } } \ No newline at end of file Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Riskeer.MacroStabilityInwards.KernelWrapper.csproj =================================================================== diff -u -rc7612f62c73a8f688a74f2d3d7e4476228cbadd7 -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Riskeer.MacroStabilityInwards.KernelWrapper.csproj (.../Riskeer.MacroStabilityInwards.KernelWrapper.csproj) (revision c7612f62c73a8f688a74f2d3d7e4476228cbadd7) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Riskeer.MacroStabilityInwards.KernelWrapper.csproj (.../Riskeer.MacroStabilityInwards.KernelWrapper.csproj) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -1,84 +1,6 @@  - - ..\..\..\..\lib\Plugins\Wti\Deltares.Geometry.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.Geotechnics.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Calculation.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Data.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Geometry.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Interface.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Io.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Kernel.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Preprocessing.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Reliability.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Standard.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Version.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.WaternetCreator.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.Mathematics.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MStab.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MStab.IO.Classic.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.Probabilistic.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.SearchAlgorithms.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.SoilStress.Calculation.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.SoilStress.Data.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.Stability.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.Stability.WTI.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.Standard.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.WTIStability.Calculation.Wrapper.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.WTIStability.Data.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.WTIStability.IO.dll - Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsOutputChartControlTest.cs =================================================================== diff -u -r8d4dc9cb96307d82dded48128d37fdfd700b2c1e -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsOutputChartControlTest.cs (.../MacroStabilityInwardsOutputChartControlTest.cs) (revision 8d4dc9cb96307d82dded48128d37fdfd700b2c1e) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsOutputChartControlTest.cs (.../MacroStabilityInwardsOutputChartControlTest.cs) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -180,6 +180,7 @@ var calculatorFactory = (TestMacroStabilityInwardsCalculatorFactory) MacroStabilityInwardsCalculatorFactory.Instance; WaternetCalculatorStub calculatorStub = calculatorFactory.LastCreatedWaternetCalculator; calculatorStub.Output = WaternetCalculatorResultTestFactory.CreateEmptyResult(); + // Call using (var control = new MacroStabilityInwardsOutputChartControl(calculation, AssessmentSectionTestHelper.GetTestAssessmentLevel)) @@ -415,22 +416,21 @@ }; using (new MacroStabilityInwardsCalculatorFactoryConfig()) + using (var control = new MacroStabilityInwardsOutputChartControl(calculation, + AssessmentSectionTestHelper.GetTestAssessmentLevel)) { - using (var control = new MacroStabilityInwardsOutputChartControl(calculation, - AssessmentSectionTestHelper.GetTestAssessmentLevel)) - { - // Precondition - var calculatorFactory = (TestMacroStabilityInwardsCalculatorFactory) MacroStabilityInwardsCalculatorFactory.Instance; - WaternetCalculatorStub calculatorStub = calculatorFactory.LastCreatedWaternetCalculator; - MacroStabilityInwardsOutputViewChartDataAssert.AssertInputChartData(calculation, GetChartControl(control).Data); + // Precondition + var calculatorFactory = (TestMacroStabilityInwardsCalculatorFactory) MacroStabilityInwardsCalculatorFactory.Instance; + WaternetCalculatorStub calculatorStub = calculatorFactory.LastCreatedWaternetCalculator; + MacroStabilityInwardsOutputViewChartDataAssert.AssertInputChartData(calculation, GetChartControl(control).Data); - calculatorStub.Output = WaternetCalculatorResultTestFactory.CreateEmptyResult(); - // Call - control.UpdateChartData(); + calculatorStub.Output = WaternetCalculatorResultTestFactory.CreateEmptyResult(); + + // Call + control.UpdateChartData(); - // Assert - MacroStabilityInwardsOutputViewChartDataAssert.AssertEmptyWaternetChartData(GetChartControl(control).Data); - } + // Assert + MacroStabilityInwardsOutputViewChartDataAssert.AssertEmptyWaternetChartData(GetChartControl(control).Data); } } Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilLayerTest.cs =================================================================== diff -u -r89f263f074499111fd54b421916b015bacc60686 -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilLayerTest.cs (.../SoilLayerTest.cs) (revision 89f263f074499111fd54b421916b015bacc60686) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilLayerTest.cs (.../SoilLayerTest.cs) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -97,7 +97,7 @@ Assert.IsNaN(layer.ShearStrengthRatio); Assert.IsNaN(layer.StrengthIncreaseExponent); Assert.IsNaN(layer.Pop); - Assert.AreEqual(0.0, layer.Dilatancy); + Assert.IsNaN(layer.Dilatancy); Assert.AreEqual(WaterPressureInterpolationModel.Automatic, layer.WaterPressureInterpolationModel); } @@ -117,7 +117,7 @@ double shearStrengthRatio = random.NextDouble(); double strengthIncreaseExponent = random.NextDouble(); double pop = random.NextDouble(); - var dilatancy = 0.0; + double dilatancy = random.NextDouble(); var waterPressureInterpolationModel = random.NextEnumValue(); // Call Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetExtremeCalculatorTest.cs =================================================================== diff -u -reefa6d1c7955d35d1a8a8f9aadf10d4aae53abba -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetExtremeCalculatorTest.cs (.../WaternetExtremeCalculatorTest.cs) (revision eefa6d1c7955d35d1a8a8f9aadf10d4aae53abba) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetExtremeCalculatorTest.cs (.../WaternetExtremeCalculatorTest.cs) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -67,7 +67,6 @@ { var factory = (TestMacroStabilityInwardsKernelFactory) MacroStabilityInwardsKernelWrapperFactory.Instance; WaternetKernelStub waternetKernel = factory.LastCreatedWaternetKernel; - factory.LastCreatedWaternetKernel.SetLocation(WaternetLocationCreator.Create(input)); SetKernelOutput(waternetKernel); // Call Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Kernels/UpliftVan/UpliftVanKernelWrapperTest.cs =================================================================== diff -u -reefa6d1c7955d35d1a8a8f9aadf10d4aae53abba -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Kernels/UpliftVan/UpliftVanKernelWrapperTest.cs (.../UpliftVanKernelWrapperTest.cs) (revision eefa6d1c7955d35d1a8a8f9aadf10d4aae53abba) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Kernels/UpliftVan/UpliftVanKernelWrapperTest.cs (.../UpliftVanKernelWrapperTest.cs) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -124,9 +124,13 @@ Assert.IsNotNull(stabilityModel.SlipCircle); Assert.AreEqual(SearchAlgorithm.Grid, stabilityModel.SearchAlgorithm); Assert.AreEqual(ModelOptions.UpliftVan, stabilityModel.ModelOption); - - AssertConstructionStages(stabilityModel.ConstructionStages, soilProfile2D, waternetDaily, waternetExtreme, fixedSoilStresses, preConsolidationStresses); + AssertConstructionStages(stabilityModel.ConstructionStages, soilProfile2D, new[] + { + waternetDaily, + waternetExtreme + }, fixedSoilStresses, preConsolidationStresses); + Assert.AreEqual(2, kernelModel.PreprocessingModel.PreProcessingConstructionStages.Count); kernelModel.PreprocessingModel.PreProcessingConstructionStages.ForEachElementDo( ppcs => Assert.AreSame(stabilityModel, ppcs.StabilityModel)); @@ -245,13 +249,16 @@ Assert.AreEqual(11, validationMessages.Count()); } - private static void AssertConstructionStages(IList constructionStages, SoilProfile2D soilProfile2D, WtiStabilityWaternet waternetDaily, WtiStabilityWaternet waternetExtreme, FixedSoilStress[] fixedSoilStresses, PreConsolidationStress[] preConsolidationStresses) + private static void AssertConstructionStages(IEnumerable constructionStages, SoilProfile2D soilProfile2D, IEnumerable waternets, + IEnumerable fixedSoilStresses, IEnumerable preConsolidationStresses) { - foreach (ConstructionStage constructionStage in constructionStages) + Assert.AreEqual(2, constructionStages.Count()); + + for (var i = 0; i < constructionStages.Count(); i++) { - Assert.AreEqual(2, constructionStages.Count); - Assert.AreSame(waternetDaily, constructionStages.First().GeotechnicsData.CurrentWaternet); - Assert.AreSame(waternetExtreme, constructionStages.Last().GeotechnicsData.CurrentWaternet); + ConstructionStage constructionStage = constructionStages.ElementAt(i); + + Assert.AreSame(waternets.ElementAt(i), constructionStage.GeotechnicsData.CurrentWaternet); Assert.AreSame(soilProfile2D, constructionStage.SoilProfile); Assert.AreEqual(1, constructionStage.MultiplicationFactorsCPhiForUpliftList.Count); Assert.AreEqual(1.2, constructionStage.MultiplicationFactorsCPhiForUpliftList[0].UpliftFactor); Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Kernels/Waternet/WaternetKernelWrapperTest.cs =================================================================== diff -u -rf21e2fd08f032d801d2ab15f5b0966e2245c6f3c -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Kernels/Waternet/WaternetKernelWrapperTest.cs (.../WaternetKernelWrapperTest.cs) (revision f21e2fd08f032d801d2ab15f5b0966e2245c6f3c) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Kernels/Waternet/WaternetKernelWrapperTest.cs (.../WaternetKernelWrapperTest.cs) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using Core.Common.Util.Reflection; using Deltares.MacroStability.Geometry; using Deltares.MacroStability.WaternetCreator; using NUnit.Framework; @@ -80,7 +79,8 @@ private class TestWaternetKernelWrapper : WaternetKernelWrapper { - public TestWaternetKernelWrapper(Location location, string waternetName) : base(location, waternetName) {} + public TestWaternetKernelWrapper(Location location, string waternetName) + : base(location, waternetName) {} } } } \ No newline at end of file Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Riskeer.MacroStabilityInwards.KernelWrapper.Test.csproj =================================================================== diff -u -r41933726374a5f613d6fef329fa5393c5a57ed8c -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Riskeer.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Riskeer.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision 41933726374a5f613d6fef329fa5393c5a57ed8c) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Riskeer.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Riskeer.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -1,30 +1,6 @@  - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Data.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Geometry.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Kernel.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Preprocessing.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Standard.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.WaternetCreator.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.SearchAlgorithms.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.SoilStress.Data.dll - Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Waternet/Output/WaternetCalculatorResultTestFactoryTest.cs =================================================================== diff -u -r3ab5eb5e03ed76e5deeafede59187a5fbc41c31c -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Waternet/Output/WaternetCalculatorResultTestFactoryTest.cs (.../WaternetCalculatorResultTestFactoryTest.cs) (revision 3ab5eb5e03ed76e5deeafede59187a5fbc41c31c) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Waternet/Output/WaternetCalculatorResultTestFactoryTest.cs (.../WaternetCalculatorResultTestFactoryTest.cs) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System.Collections.Generic; using System.Linq; using Core.Common.Base.Geometry; using NUnit.Framework; @@ -69,8 +68,8 @@ WaternetCalculatorResult result = WaternetCalculatorResultTestFactory.CreateEmptyResult(); // Assert - CollectionAssert.AreEqual(new List(), result.PhreaticLines); - CollectionAssert.AreEqual(new List(), result.WaternetLines); + CollectionAssert.IsEmpty(result.PhreaticLines); + CollectionAssert.IsEmpty(result.WaternetLines); } } } \ No newline at end of file Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj =================================================================== diff -u -rc7612f62c73a8f688a74f2d3d7e4476228cbadd7 -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj (.../Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj) (revision c7612f62c73a8f688a74f2d3d7e4476228cbadd7) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj (.../Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -1,18 +1,6 @@  - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Data.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Geometry.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Standard.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.WaternetCreator.dll - Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.csproj =================================================================== diff -u -rc7612f62c73a8f688a74f2d3d7e4476228cbadd7 -r0fd821099e40783d33174622452d5814301170f3 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.csproj (.../Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.csproj) (revision c7612f62c73a8f688a74f2d3d7e4476228cbadd7) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.csproj (.../Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil.csproj) (revision 0fd821099e40783d33174622452d5814301170f3) @@ -1,18 +1,6 @@  - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Data.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Geometry.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.Standard.dll - - - ..\..\..\..\lib\Plugins\Wti\Deltares.MacroStability.WaternetCreator.dll -