Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelper.cs =================================================================== diff -u -r4998 -r5004 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelper.cs (.../MacroStabilityCommonHelper.cs) (revision 4998) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelper.cs (.../MacroStabilityCommonHelper.cs) (revision 5004) @@ -418,8 +418,16 @@ { if (subSoilScenario.SoilProfile2D == null) { - throw new ArgumentNullException(nameof(subSoilScenario.SoilProfile1D), @"SoilProfile2D cannot be null."); + throw new ArgumentNullException(nameof(subSoilScenario), @"SoilProfile2D cannot be null."); } + if (surfaceLine2 == null) + { + throw new ArgumentNullException(nameof(surfaceLine2), @"SurfaceLine cannot be null."); + } + if (dikeEmbankmentSoil == null) + { + throw new ArgumentNullException(nameof(dikeEmbankmentSoil), @"DikeEmbankmentSoil cannot be null."); + } FitSoilProfile2DToSurfaceLine(subSoilScenario, surfaceLine2); } Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/GeometryHelperTests.cs =================================================================== diff -u -r4990 -r5004 --- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/GeometryHelperTests.cs (.../GeometryHelperTests.cs) (revision 4990) +++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/GeometryHelperTests.cs (.../GeometryHelperTests.cs) (revision 5004) @@ -61,11 +61,11 @@ Assert.That(geometryBounds.Left, Is.EqualTo(-2).Within(cTolerance)); Assert.That(soilProfile2D.Geometry.Left, Is.EqualTo(-2).Within(cTolerance)); // At first there are 3 surfaces, but after extending the right boundary, there are 6 surfaces - Assert.That(soilProfile2D.Geometry.Surfaces.Count, Is.EqualTo(6)); + Assert.That(soilProfile2D.Geometry.Surfaces, Has.Count.EqualTo(6)); // the number of points should now be 12 + 4 = 16 - Assert.That(soilProfile2D.Geometry.Points.Count, Is.EqualTo(16)); + Assert.That(soilProfile2D.Geometry.Points, Has.Count.EqualTo(16)); // the number of curves should now be 14 + 7 = 21 - Assert.That(soilProfile2D.Geometry.Curves.Count, Is.EqualTo(21)); + Assert.That(soilProfile2D.Geometry.Curves, Has.Count.EqualTo(21)); }); } @@ -96,11 +96,11 @@ { Assert.That(soilProfile2D.Geometry.Right, Is.EqualTo(12).Within(cTolerance)); // At first there are 3 surfaces, but after extending the right boundary, there are 6 surfaces - Assert.That(soilProfile2D.Geometry.Surfaces.Count, Is.EqualTo(6)); + Assert.That(soilProfile2D.Geometry.Surfaces, Has.Count.EqualTo(6)); // the number of points should now be 12 + 4 = 16 - Assert.That(soilProfile2D.Geometry.Points.Count, Is.EqualTo(16)); + Assert.That(soilProfile2D.Geometry.Points, Has.Count.EqualTo(16)); // the number of curves should now be 14 + 7 = 21 - Assert.That(soilProfile2D.Geometry.Curves.Count, Is.EqualTo(21)); + Assert.That(soilProfile2D.Geometry.Curves, Has.Count.EqualTo(21)); }); } @@ -135,7 +135,7 @@ { Assert.That(geometryBounds.Left, Is.EqualTo(2).Within(cTolerance)); Assert.That(soilProfile2D.Geometry.Left, Is.EqualTo(2).Within(cTolerance)); - Assert.That(soilProfile2D.Geometry.Surfaces.Count, Is.EqualTo(3)); + Assert.That(soilProfile2D.Geometry.Surfaces, Has.Count.EqualTo(3)); }); } @@ -160,7 +160,7 @@ { Assert.That(geometryBounds.Right, Is.EqualTo(8).Within(cTolerance)); Assert.That(soilProfile2D.Geometry.Right, Is.EqualTo(8).Within(cTolerance)); - Assert.That(soilProfile2D.Geometry.Surfaces.Count, Is.EqualTo(3)); + Assert.That(soilProfile2D.Geometry.Surfaces, Has.Count.EqualTo(3)); }); } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelperTests.cs =================================================================== diff -u -r5003 -r5004 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelperTests.cs (.../MacroStabilityCommonHelperTests.cs) (revision 5003) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelperTests.cs (.../MacroStabilityCommonHelperTests.cs) (revision 5004) @@ -269,7 +269,7 @@ }); } - private SoilGeometryProbability CreateSoilGeometryProbabilityWithSoilProfile2DWithSurfaceLineDitchDike() + private static SoilGeometryProbability CreateSoilGeometryProbabilityWithSoilProfile2DWithSurfaceLineDitchDike() { SoilGeometryProbability soilGeometryProbability = FactoryForSoilGeometryProbabilities.CreateSoilGeometryProbabilityWithSoilProfile1D(); SurfaceLine2 surfaceLine = FactoryForSurfaceLines.CreateSurfaceLineWithDikeAndDitch();