Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/SurfaceLineCreator.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/SurfaceLineCreator.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/SurfaceLineCreator.cs (revision b8a87d12087e3af75515ecbf7ddf5004108e826d) @@ -0,0 +1,163 @@ +// 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. + +using System; +using System.Collections.Generic; +using System.Linq; +using Core.Common.Base.Geometry; +using Deltares.WTIStability.Data.Geo; +using Deltares.WTIStability.Data.Standard; +using Ringtoets.MacroStabilityInwards.Primitives; +using Point2D = Core.Common.Base.Geometry.Point2D; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Creators +{ + /// + /// Creates instances which are required by the . + /// + internal static class SurfaceLineCreator + { + /// + /// Creates a based on information of , + /// which can be used in the . + /// + /// The from + /// which to take the information. + /// A new with information taken from the . + /// Thrown when is null. + public static SurfaceLine2 Create(MacroStabilityInwardsSurfaceLine surfaceLine) + { + if (surfaceLine == null) + { + throw new ArgumentNullException(nameof(surfaceLine)); + } + + var WTISurfaceLine = new SurfaceLine2 + { + Name = surfaceLine.Name + }; + + if (surfaceLine.Points.Any()) + { + var geometry = new GeometryPointString(); + ((List) geometry.Points).AddRange(surfaceLine.LocalGeometry.Select(CreateGeometryPoint)); + WTISurfaceLine.Geometry = geometry; + + foreach (CharacteristicPoint characteristicPoint in CreateCharacteristicPoints(surfaceLine).ToArray()) + { + WTISurfaceLine.CharacteristicPoints.Add(characteristicPoint); + } + } + + return WTISurfaceLine; + } + + private static IEnumerable CreateCharacteristicPoints(MacroStabilityInwardsSurfaceLine surfaceLine) + { + Point2D[] projectedPoints = surfaceLine.LocalGeometry.ToArray(); + var characteristicPoints = new List(); + + for (var i = 0; i < surfaceLine.Points.Length; i++) + { + IEnumerable newPoints = CreateCharacteristicPoint(surfaceLine, projectedPoints, i); + characteristicPoints.AddRange(newPoints); + } + return characteristicPoints; + } + + private static IEnumerable CreateCharacteristicPoint(MacroStabilityInwardsSurfaceLine surfaceLine, Point2D[] projectedPoints, int index) + { + Point3D surfaceLinePoint = surfaceLine.Points[index]; + Point2D projectedPoint = projectedPoints[index]; + + IList characteristicPoints = new List(); + + if (ReferenceEquals(surfaceLine.DitchPolderSide, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.DitchPolderSide)); + } + if (ReferenceEquals(surfaceLine.BottomDitchPolderSide, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.BottomDitchPolderSide)); + } + if (ReferenceEquals(surfaceLine.BottomDitchDikeSide, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.BottomDitchDikeSide)); + } + if (ReferenceEquals(surfaceLine.DitchDikeSide, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.DitchDikeSide)); + } + if (ReferenceEquals(surfaceLine.DikeToeAtPolder, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.DikeToeAtPolder)); + } + if (ReferenceEquals(surfaceLine.DikeToeAtRiver, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.DikeToeAtRiver)); + } + if (ReferenceEquals(surfaceLine.DikeTopAtPolder, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.DikeTopAtPolder)); + } + if (ReferenceEquals(surfaceLine.TrafficLoadInside, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.TrafficLoadInside)); + } + if (ReferenceEquals(surfaceLine.TrafficLoadOutside, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.TrafficLoadOutside)); + } + if (ReferenceEquals(surfaceLine.ShoulderBaseInside, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.ShoulderBaseInside)); + } + if (ReferenceEquals(surfaceLine.ShoulderTopInside, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.ShoulderTopInside)); + } + if (ReferenceEquals(surfaceLine.SurfaceLevelInside, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.SurfaceLevelInside)); + } + if (ReferenceEquals(surfaceLine.SurfaceLevelOutside, surfaceLinePoint)) + { + characteristicPoints.Add(CreateCharacteristicPointOfType(projectedPoint, CharacteristicPointType.SurfaceLevelOutside)); + } + + return characteristicPoints; + } + + private static CharacteristicPoint CreateCharacteristicPointOfType(Point2D projectedPoint, CharacteristicPointType pointType) + { + return new CharacteristicPoint + { + CharacteristicPointType = pointType, + GeometryPoint = CreateGeometryPoint(projectedPoint) + }; + } + + private static GeometryPoint CreateGeometryPoint(Point2D projectedPoint) + { + return new GeometryPoint(projectedPoint.X, projectedPoint.Y); + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs =================================================================== diff -u -r206b4532b803312043b7f85fc4aaeb9ae7b8104b -rb8a87d12087e3af75515ecbf7ddf5004108e826d --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs (.../MacroStabilityInwardsCalculator.cs) (revision 206b4532b803312043b7f85fc4aaeb9ae7b8104b) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs (.../MacroStabilityInwardsCalculator.cs) (revision b8a87d12087e3af75515ecbf7ddf5004108e826d) @@ -100,6 +100,8 @@ .ToDictionary(x => x.layer, x => x.soil); calculator.SoilProfile = SoilProfileCreator.Create(layersWithSoils); + calculator.Location = StabilityLocationCreator.Create(input); + calculator.SurfaceLine = SurfaceLineCreator.Create(input.SurfaceLine); return calculator; } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj =================================================================== diff -u -rc62200ea10d37435621c8f3387c78dc911b6b7e2 -rb8a87d12087e3af75515ecbf7ddf5004108e826d --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.csproj) (revision c62200ea10d37435621c8f3387c78dc911b6b7e2) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.csproj) (revision b8a87d12087e3af75515ecbf7ddf5004108e826d) @@ -45,6 +45,7 @@ + Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs =================================================================== diff -u -r206b4532b803312043b7f85fc4aaeb9ae7b8104b -rb8a87d12087e3af75515ecbf7ddf5004108e826d --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs (.../IUpliftVanCalculator.cs) (revision 206b4532b803312043b7f85fc4aaeb9ae7b8104b) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs (.../IUpliftVanCalculator.cs) (revision b8a87d12087e3af75515ecbf7ddf5004108e826d) @@ -50,6 +50,11 @@ StabilityLocation Location { set; } /// + /// Sets the surface line. + /// + SurfaceLine2 SurfaceLine { set; } + + /// /// Sets the move grid property. /// bool MoveGrid { set; } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs =================================================================== diff -u -r206b4532b803312043b7f85fc4aaeb9ae7b8104b -rb8a87d12087e3af75515ecbf7ddf5004108e826d --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 206b4532b803312043b7f85fc4aaeb9ae7b8104b) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision b8a87d12087e3af75515ecbf7ddf5004108e826d) @@ -20,12 +20,10 @@ // All rights reserved. using System; -using Deltares.WaternetCreator; using Deltares.WTIStability; using Deltares.WTIStability.Calculation.Wrapper; using Deltares.WTIStability.Data.Geo; using Deltares.WTIStability.IO; -using Ringtoets.MacroStabilityInwards.Primitives; namespace Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator { @@ -47,25 +45,10 @@ { ModelOption = ModelOptions.UpliftVan, SearchAlgorithm = SearchAlgorithm.Grid, - GridOrientation = GridOrientation.Inwards, + GridOrientation = GridOrientation.Inwards }; } - public void Calculate() - { - try - { - wrappedCalculator.InitializeForDeterministic(WTISerializer.Serialize(calculatorInput)); - - var messages = wrappedCalculator.Validate(); - wrappedCalculator.Run(); - } - catch (Exception e) - { - // Do nothing - } - } - public SoilModel SoilModel { set @@ -90,6 +73,15 @@ } } + public SurfaceLine2 SurfaceLine + { + set + { + calculatorInput.SurfaceLine2 = value; + } + } + + public bool MoveGrid { set @@ -105,5 +97,20 @@ calculatorInput.MaximumSliceWidth = value; } } + + public void Calculate() + { + try + { + wrappedCalculator.InitializeForDeterministic(WTISerializer.Serialize(calculatorInput)); + + string messages = wrappedCalculator.Validate(); + wrappedCalculator.Run(); + } + catch (Exception e) + { + // Do nothing + } + } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/SurfaceLineCreatorTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/SurfaceLineCreatorTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/SurfaceLineCreatorTest.cs (revision b8a87d12087e3af75515ecbf7ddf5004108e826d) @@ -0,0 +1,243 @@ +// 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. + +using System; +using System.Linq; +using Core.Common.Base.Geometry; +using Core.Common.TestUtil; +using Deltares.WTIStability.Data.Geo; +using NUnit.Framework; +using Ringtoets.MacroStabilityInwards.KernelWrapper.Creators; +using Ringtoets.MacroStabilityInwards.Primitives; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test.Creators +{ + [TestFixture] + public class SurfaceLineCreatorTest + { + [Test] + public void Create_MacroStabilityInwardsSurfaceLineNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => SurfaceLineCreator.Create(null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("surfaceLine", exception.ParamName); + } + + [Test] + public void Create_SurfaceLineWithoutPoints_CreateSurfaceLineWithoutPoints() + { + // Setup + const string name = "Surface line without points"; + var surfaceLine = new MacroStabilityInwardsSurfaceLine(name); + + // Call + SurfaceLine2 actual = SurfaceLineCreator.Create(surfaceLine); + + // Assert + Assert.AreEqual(name, actual.Name); + CollectionAssert.IsEmpty(actual.Geometry.Points); + } + + [Test] + public void Create_NormalizedLocalSurfaceLine_ReturnsSurfaceLineWithIdenticalPoints() + { + // Setup + const string name = "Local coordinate surface line"; + var surfaceLine = new MacroStabilityInwardsSurfaceLine(name); + surfaceLine.SetGeometry(new[] + { + new Point3D(0.0, 0.0, 1.1), + new Point3D(2.2, 0.0, 3.3), + new Point3D(4.4, 0.0, 5.5) + }); + + // Call + SurfaceLine2 actual = SurfaceLineCreator.Create(surfaceLine); + + // Assert + Assert.AreEqual(name, actual.Name); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.X).ToArray(), actual.Geometry.Points.Select(p => p.X).ToArray()); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.Z).ToArray(), actual.Geometry.Points.Select(p => p.Z).ToArray()); + CollectionAssert.AreEqual(Enumerable.Repeat(CharacteristicPointType.None, surfaceLine.Points.Length), actual.CharacteristicPoints.Select(p => p.CharacteristicPointType)); + } + + [Test] + public void Create_LocalSurfaceLineNotNormalized_TranslateAllPointsToMakeFirstCoordinateZeroX() + { + // Setup + const string name = "Local coordinate surface line"; + const double firstX = 4.6; + var surfaceLine = new MacroStabilityInwardsSurfaceLine(name); + surfaceLine.SetGeometry(new[] + { + new Point3D(firstX, 0.0, 1.1), + new Point3D(7.8, 0.0, 3.3), + new Point3D(9.9, 0.0, 5.5) + }); + + // Call + SurfaceLine2 actual = SurfaceLineCreator.Create(surfaceLine); + + // Assert + double[] expectedCoordinatesX = surfaceLine.Points.Select(p => p.X - firstX).ToArray(); + Assert.AreEqual(name, actual.Name); + CollectionAssert.AreEqual(expectedCoordinatesX, actual.Geometry.Points.Select(p => p.X).ToArray(), new DoubleWithToleranceComparer(1e-2)); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.Z).ToArray(), actual.Geometry.Points.Select(p => p.Z).ToArray()); + CollectionAssert.AreEqual(Enumerable.Repeat(CharacteristicPointType.None, surfaceLine.Points.Length), actual.CharacteristicPoints.Select(p => p.CharacteristicPointType)); + } + + [Test] + public void Create_GlobalSurfaceLine_ProjectSurfaceLineIntoLZPlaneSpannedByFirstAndLastPoint() + { + // Setup + const string name = "Global coordinate surface line"; + var surfaceLine = new MacroStabilityInwardsSurfaceLine(name); + surfaceLine.SetGeometry(new[] + { + new Point3D(1.0, 1.0, 2.2), + new Point3D(2.0, 3.0, 4.4), // Outlier from line specified by extrema + new Point3D(3.0, 4.0, 7.7) + }); + + // Call + SurfaceLine2 actual = SurfaceLineCreator.Create(surfaceLine); + + // Assert + double length = Math.Sqrt(2 * 2 + 3 * 3); + const double secondCoordinateFactor = (2.0 * 1.0 + 3.0 * 2.0) / (2.0 * 2.0 + 3.0 * 3.0); + double[] expectedCoordinatesX = + { + 0.0, + secondCoordinateFactor * length, + length + }; + Assert.AreEqual(name, actual.Name); + CollectionAssert.AreEqual(expectedCoordinatesX, actual.Geometry.Points.Select(p => p.X).ToArray(), new DoubleWithToleranceComparer(1e-2)); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.Z).ToArray(), actual.Geometry.Points.Select(p => p.Z).ToArray()); + CollectionAssert.AreEqual(Enumerable.Repeat(CharacteristicPointType.None, surfaceLine.Points.Length), actual.CharacteristicPoints.Select(p => p.CharacteristicPointType)); + } + + [Test] + public void Create_SurfaceLineWithOnlyOnePoint_CreatePipingSurfaceLineWithOnePoint() + { + // Setup + const string name = "Global coordinate surface line"; + var surfaceLine = new MacroStabilityInwardsSurfaceLine(name); + surfaceLine.SetGeometry(new[] + { + new Point3D(1.0, 1.0, 2.2) + }); + + // Call + SurfaceLine2 actual = SurfaceLineCreator.Create(surfaceLine); + + // Assert + double[] expectedCoordinatesX = + { + 0.0 + }; + Assert.AreEqual(name, actual.Name); + CollectionAssert.AreEqual(expectedCoordinatesX, actual.Geometry.Points.Select(p => p.X).ToArray()); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.Z).ToArray(), actual.Geometry.Points.Select(p => p.Z).ToArray()); + CollectionAssert.AreEqual(Enumerable.Repeat(CharacteristicPointType.None, surfaceLine.Points.Length), actual.CharacteristicPoints.Select(p => p.CharacteristicPointType)); + } + + [Test] + public void Create_SurfaceLineWithAllCharacteristicPoints_CreateSurfaceLineWithGeometryAndCharacteristicPoints() + { + // Setup + const string name = "Surface line with characteristic points"; + var geometry = new[] + { + new Point3D(0, 0, 0), + new Point3D(1, 0, 2), + new Point3D(2, 0, 3), + new Point3D(3, 0, 0), + new Point3D(4, 0, 2), + new Point3D(5, 0, 3), + new Point3D(6, 0, 0), + new Point3D(7, 0, 2), + new Point3D(8, 0, 3), + new Point3D(9, 0, 0), + new Point3D(10, 0, 2), + new Point3D(11, 0, 3), + new Point3D(12, 0, 0) + }; + + var surfaceLine = new MacroStabilityInwardsSurfaceLine(name); + surfaceLine.SetGeometry(geometry); + surfaceLine.SetBottomDitchDikeSideAt(geometry[0]); + surfaceLine.SetBottomDitchPolderSideAt(geometry[1]); + surfaceLine.SetDikeToeAtPolderAt(geometry[2]); + surfaceLine.SetDikeToeAtRiverAt(geometry[3]); + surfaceLine.SetDikeTopAtPolderAt(geometry[4]); + surfaceLine.SetDitchDikeSideAt(geometry[5]); + surfaceLine.SetDitchPolderSideAt(geometry[6]); + surfaceLine.SetSurfaceLevelInsideAt(geometry[7]); + surfaceLine.SetSurfaceLevelOutsideAt(geometry[8]); + surfaceLine.SetTrafficLoadInsideAt(geometry[9]); + surfaceLine.SetTrafficLoadOutsideAt(geometry[10]); + surfaceLine.SetShoulderBaseInsideAt(geometry[11]); + surfaceLine.SetShoulderTopInsideAt(geometry[12]); + + // Call + SurfaceLine2 actual = SurfaceLineCreator.Create(surfaceLine); + + // Assert + Assert.AreEqual(name, actual.Name); + + double[] expectedCoordinatesX = surfaceLine.Points.Select(p => p.X).ToArray(); + expectedCoordinatesX = expectedCoordinatesX.Concat(expectedCoordinatesX).ToArray(); + + double[] expectedCoordinatesZ = surfaceLine.Points.Select(p => p.Z).ToArray(); + expectedCoordinatesZ = expectedCoordinatesZ.Concat(expectedCoordinatesZ).ToArray(); + + CollectionAssert.AreEqual(expectedCoordinatesX, actual.Geometry.Points.Select(p => p.X)); + CollectionAssert.AreEqual(expectedCoordinatesZ, actual.Geometry.Points.Select(p => p.Z)); + + CharacteristicPointSet actualCharacteristicPoints = actual.CharacteristicPoints; + CollectionAssert.AreEqual(expectedCoordinatesX, actualCharacteristicPoints.Geometry.Points.Select(p => p.X)); + CollectionAssert.AreEqual(expectedCoordinatesZ, actualCharacteristicPoints.Geometry.Points.Select(p => p.Z)); + + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchDikeSide).LocationEquals(ToGeometryPoint(geometry[0]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchPolderSide).LocationEquals(ToGeometryPoint(geometry[1]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).LocationEquals(ToGeometryPoint(geometry[2]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver).LocationEquals(ToGeometryPoint(geometry[3]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).LocationEquals(ToGeometryPoint(geometry[4]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchDikeSide).LocationEquals(ToGeometryPoint(geometry[5]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchPolderSide).LocationEquals(ToGeometryPoint(geometry[6]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelInside).LocationEquals(ToGeometryPoint(geometry[7]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelOutside).LocationEquals(ToGeometryPoint(geometry[8]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.TrafficLoadInside).LocationEquals(ToGeometryPoint(geometry[9]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.TrafficLoadOutside).LocationEquals(ToGeometryPoint(geometry[10]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside).LocationEquals(ToGeometryPoint(geometry[11]))); + Assert.IsTrue(actualCharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside).LocationEquals(ToGeometryPoint(geometry[12]))); + } + + private static GeometryPoint ToGeometryPoint(Point3D point) + { + return new GeometryPoint(point.X, point.Z); + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj =================================================================== diff -u -rc62200ea10d37435621c8f3387c78dc911b6b7e2 -rb8a87d12087e3af75515ecbf7ddf5004108e826d --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision c62200ea10d37435621c8f3387c78dc911b6b7e2) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision b8a87d12087e3af75515ecbf7ddf5004108e826d) @@ -62,6 +62,7 @@ + Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs =================================================================== diff -u -r206b4532b803312043b7f85fc4aaeb9ae7b8104b -rb8a87d12087e3af75515ecbf7ddf5004108e826d --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs (.../UpliftVanCalculatorStub.cs) (revision 206b4532b803312043b7f85fc4aaeb9ae7b8104b) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs (.../UpliftVanCalculatorStub.cs) (revision b8a87d12087e3af75515ecbf7ddf5004108e826d) @@ -45,6 +45,8 @@ public double MaximumSliceWidth { get; set; } + public SurfaceLine2 SurfaceLine { get; set; } + public void Calculate() { Calculated = true;