Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineShoulderAdapterTest.cs =================================================================== diff -u -r6404 -r7077 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineShoulderAdapterTest.cs (.../SurfaceLineShoulderAdapterTest.cs) (revision 6404) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineShoulderAdapterTest.cs (.../SurfaceLineShoulderAdapterTest.cs) (revision 7077) @@ -1,4 +1,4 @@ -// Copyright (C) Stichting Deltares 2025. All rights reserved. +// Copyright (C) Stichting Deltares 2026. All rights reserved. // // This file is part of the Dam Engine. // @@ -33,7 +33,7 @@ [TestFixture] public class SurfaceLineShoulderAdapterTest { - const double pointCoordinateTolerance = 0.001; + private const double pointCoordinateTolerance = 0.001; [Test] public void ThrowsAnExceptionWhenNoSurfaceLevelPointExist() @@ -338,7 +338,7 @@ surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location, 0); SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); - double expectedShoulderHeight = Math.Min(shoulderHeight, (surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeToeAtPolder).Z)); + double expectedShoulderHeight = Math.Min(shoulderHeight, surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeToeAtPolder).Z); var expectedPoint = new Point2D( pointAtTopPolder.X + (1 - expectedShoulderHeight) + shoulderLength + expectedShoulderHeight * surfaceLineAdapter.SlopeOfNewShoulder, 0); Point2D actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeToeAtPolder); @@ -448,7 +448,7 @@ SlopeOfNewShoulder = 2 }; SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); - double expectedShoulderHeight = Math.Min(shoulderHeight, (surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeToeAtPolder).Z)); + double expectedShoulderHeight = Math.Min(shoulderHeight, surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeToeAtPolder).Z); double expectedShoulderBaseX = pointAtTopPolder.X + (1 - expectedShoulderHeight); Assert.That(adaptedSurfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.ShoulderBaseInside).X, Is.EqualTo(expectedShoulderBaseX)); Assert.That(adaptedSurfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.ShoulderBaseInside).Z, Is.EqualTo(expectedShoulderHeight)); @@ -1694,7 +1694,7 @@ surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location, 0); SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); - double expectedShoulderHeight = Math.Min(shoulderHeight, (surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeToeAtPolder).Z)); + double expectedShoulderHeight = Math.Min(shoulderHeight, surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.DikeToeAtPolder).Z); var expectedPoint = new Point2D(3, expectedShoulderHeight); Point2D actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetPoint2D(CharacteristicPointType.ShoulderTopInside); Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True);