Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineShoulderAdapterTest.cs =================================================================== diff -u -r4624 -r4627 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineShoulderAdapterTest.cs (.../SurfaceLineShoulderAdapterTest.cs) (revision 4624) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineShoulderAdapterTest.cs (.../SurfaceLineShoulderAdapterTest.cs) (revision 4627) @@ -121,7 +121,7 @@ surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location, 0); SurfaceLine2 constructNewSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(0, 0, false); - Assert.IsNotNull(constructNewSurfaceLine); + Assert.That(constructNewSurfaceLine, Is.Not.Null); } /// @@ -171,12 +171,12 @@ surfaceLine.EnsurePointOfType(pointAtTopPolder.X, pointAtTopPolder.Z, CharacteristicPointType.DikeTopAtPolder); surfaceLine.EnsurePointOfType(pointAtToePolder.X, pointAtToePolder.Z, CharacteristicPointType.DikeToeAtPolder); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); - Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside)); - Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); + Assert.That(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside), Is.Null); + Assert.That(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside), Is.Null); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location, 0); SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); - Assert.IsNotNull(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside)); - Assert.IsNotNull(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); + Assert.That(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside), Is.Not.Null); + Assert.That(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside), Is.Not.Null); } /// @@ -232,7 +232,7 @@ double expectedShoulderHeight = Math.Min(shoulderHeight, surfaceLineAdapter.MaxShoulderLevel - pointAtToePolder.Z); var expectedPoint = new GeometryPoint(3.33, expectedShoulderHeight); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); } /// @@ -286,7 +286,7 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); } /// @@ -342,7 +342,7 @@ var expectedPoint = new GeometryPoint( pointAtTopPolder.X + (1 - expectedShoulderHeight) + shoulderLength + expectedShoulderHeight * surfaceLineAdapter.SlopeOfNewShoulder, 0); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); } /// @@ -485,7 +485,7 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.66, 0.67); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); } [Test] @@ -650,8 +650,8 @@ double actualXValue = pointAtSurfaceLevelInside.X; Assert.That(actualPoint.X, Is.EqualTo(actualXValue).Within(pointCoordinateTolerance)); Assert.That(actualPoint.Z, Is.EqualTo(pointAtSurfaceLevelInside.Z).Within(pointCoordinateTolerance)); - Assert.IsTrue(adaptedSurfaceLine.Geometry.Points.Any(p => p.LocationEquals(extraPoint2))); - Assert.IsFalse(adaptedSurfaceLine.Geometry.Points.Any(p => p.LocationEquals(extraPoint1))); + Assert.That(adaptedSurfaceLine.Geometry.Points.Any(p => p.LocationEquals(extraPoint2)), Is.True); + Assert.That(adaptedSurfaceLine.Geometry.Points.Any(p => p.LocationEquals(extraPoint1)), Is.False); } [Test] @@ -661,8 +661,8 @@ var location = new Location(); const int shoulderLength = 2; const int shoulderHeight = 1; - Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside)); - Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); + Assert.That(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside), Is.Null); + Assert.That(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside), Is.Null); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location, 0); SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(surfaceLine, adaptedSurfaceLine, shoulderHeight, shoulderLength); @@ -677,8 +677,8 @@ const int shoulderHeight = 1; surfaceLine.EnsurePoint(8, 1.9); surfaceLine.SortPoints(); - Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside)); - Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); + Assert.That(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside), Is.Null); + Assert.That(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside), Is.Null); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location, 0); SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); Assert.That(surfaceLine.Geometry.Points.Count, Is.EqualTo(7)); @@ -833,25 +833,25 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); var expectedShoulderTopInside = new GeometryPoint(4.5, 1); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedShoulderTopInside.LocationEquals(actualPoint)); + Assert.That(expectedShoulderTopInside.LocationEquals(actualPoint), Is.True); var expectedDikeToePolder = new GeometryPoint(6.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedDikeToePolder.LocationEquals(actualPoint)); + Assert.That(expectedDikeToePolder.LocationEquals(actualPoint), Is.True); var expectedDitchDikeSide = new GeometryPoint(11.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchDikeSide); - Assert.IsTrue(expectedDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchDikeSide = new GeometryPoint(12.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchDikeSide); - Assert.IsTrue(expectedBottomDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchPolderSide = new GeometryPoint(13.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchPolderSide); - Assert.IsTrue(expectedBottomDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchPolderSide.LocationEquals(actualPoint), Is.True); var expectedDitchPolderSide = new GeometryPoint(14.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchPolderSide); - Assert.IsTrue(expectedDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchPolderSide.LocationEquals(actualPoint), Is.True); Assert.That(surfaceLine.Geometry.Points.Count, Is.EqualTo(9)); Assert.That(adaptedSurfaceLine.Geometry.Points.Count, Is.EqualTo(12)); } @@ -931,25 +931,25 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); var expectedShoulderTopInside = new GeometryPoint(4.5, 1); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedShoulderTopInside.LocationEquals(actualPoint)); + Assert.That(expectedShoulderTopInside.LocationEquals(actualPoint), Is.True); var expectedDikeToePolder = new GeometryPoint(6.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedDikeToePolder.LocationEquals(actualPoint)); + Assert.That(expectedDikeToePolder.LocationEquals(actualPoint), Is.True); var expectedDitchDikeSide = new GeometryPoint(11.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchDikeSide); - Assert.IsTrue(expectedDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchDikeSide = new GeometryPoint(12.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchDikeSide); - Assert.IsTrue(expectedBottomDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchPolderSide = new GeometryPoint(13.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchPolderSide); - Assert.IsTrue(expectedBottomDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchPolderSide.LocationEquals(actualPoint), Is.True); var expectedDitchPolderSide = new GeometryPoint(14.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchPolderSide); - Assert.IsTrue(expectedDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchPolderSide.LocationEquals(actualPoint), Is.True); Assert.That(surfaceLine.Geometry.Points.Count, Is.EqualTo(9)); Assert.That(adaptedSurfaceLine.Geometry.Points.Count, Is.EqualTo(12)); } @@ -1035,13 +1035,13 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); var expectedShoulderTopInside = new GeometryPoint(4.5, 1); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedShoulderTopInside.LocationEquals(actualPoint)); + Assert.That(expectedShoulderTopInside.LocationEquals(actualPoint), Is.True); var expectedDikeToePolder = new GeometryPoint(6.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedDikeToePolder.LocationEquals(actualPoint)); + Assert.That(expectedDikeToePolder.LocationEquals(actualPoint), Is.True); Assert.That(surfaceLine.Geometry.Points.Count, Is.EqualTo(10)); Assert.That(adaptedSurfaceLine.Geometry.Points.Count, Is.EqualTo(11)); } @@ -1133,25 +1133,25 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); var expectedShoulderTopInside = new GeometryPoint(4.5, 1); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedShoulderTopInside.LocationEquals(actualPoint)); + Assert.That(expectedShoulderTopInside.LocationEquals(actualPoint), Is.True); var expectedDikeToePolder = new GeometryPoint(6.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedDikeToePolder.LocationEquals(actualPoint)); + Assert.That(expectedDikeToePolder.LocationEquals(actualPoint), Is.True); var expectedDitchDikeSide = new GeometryPoint(11.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchDikeSide); - Assert.IsTrue(expectedDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchDikeSide = new GeometryPoint(12.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchDikeSide); - Assert.IsTrue(expectedBottomDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchPolderSide = new GeometryPoint(13.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchPolderSide); - Assert.IsTrue(expectedBottomDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchPolderSide.LocationEquals(actualPoint), Is.True); var expectedDitchPolderSide = new GeometryPoint(18.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchPolderSide); - Assert.IsTrue(expectedDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchPolderSide.LocationEquals(actualPoint), Is.True); Assert.That(surfaceLine.Geometry.Points.Count, Is.EqualTo(11)); Assert.That(adaptedSurfaceLine.Geometry.Points.Count, Is.EqualTo(11)); } @@ -1250,28 +1250,28 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); var expectedShoulderTopInside = new GeometryPoint(4.5, 1); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedShoulderTopInside.LocationEquals(actualPoint)); + Assert.That(expectedShoulderTopInside.LocationEquals(actualPoint), Is.True); var expectedDikeToePolder = new GeometryPoint(6.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedDikeToePolder.LocationEquals(actualPoint)); + Assert.That(expectedDikeToePolder.LocationEquals(actualPoint), Is.True); var expectedDitchDikeSide = new GeometryPoint(11.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchDikeSide); - Assert.IsTrue(expectedDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchDikeSide = new GeometryPoint(12.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchDikeSide); - Assert.IsTrue(expectedBottomDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchPolderSide = new GeometryPoint(13.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchPolderSide); - Assert.IsTrue(expectedBottomDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchPolderSide.LocationEquals(actualPoint), Is.True); var expectedDitchPolderSide = new GeometryPoint(14.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchPolderSide); - Assert.IsTrue(expectedDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchPolderSide.LocationEquals(actualPoint), Is.True); var expectedExtraPointBeyondDitchUnchanged = new GeometryPoint(20, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints[adaptedSurfaceLine.CharacteristicPoints.Count - 2]; - Assert.IsTrue(expectedExtraPointBeyondDitchUnchanged.LocationEquals(actualPoint)); + Assert.That(expectedExtraPointBeyondDitchUnchanged.LocationEquals(actualPoint), Is.True); Assert.That(surfaceLine.Geometry.Count, Is.EqualTo(12)); Assert.That(adaptedSurfaceLine.Geometry.Count, Is.EqualTo(13)); } @@ -1373,31 +1373,31 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); var expectedShoulderTopInside = new GeometryPoint(4.5, 1); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedShoulderTopInside.LocationEquals(actualPoint)); + Assert.That(expectedShoulderTopInside.LocationEquals(actualPoint), Is.True); var expectedDikeToePolder = new GeometryPoint(6.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedDikeToePolder.LocationEquals(actualPoint)); + Assert.That(expectedDikeToePolder.LocationEquals(actualPoint), Is.True); var expectedDitchDikeSide = new GeometryPoint(11.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchDikeSide); - Assert.IsTrue(expectedDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchDikeSide = new GeometryPoint(12.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchDikeSide); - Assert.IsTrue(expectedBottomDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchPolderSide = new GeometryPoint(13.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchPolderSide); - Assert.IsTrue(expectedBottomDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchPolderSide.LocationEquals(actualPoint), Is.True); var expectedDitchPolderSide = new GeometryPoint(14.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchPolderSide); - Assert.IsTrue(expectedDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchPolderSide.LocationEquals(actualPoint), Is.True); var expectedExtraPointBeyondDitchUnchanged1 = new GeometryPoint(19, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints[adaptedSurfaceLine.CharacteristicPoints.Count - 3]; - Assert.IsTrue(expectedExtraPointBeyondDitchUnchanged1.LocationEquals(actualPoint)); + Assert.That(expectedExtraPointBeyondDitchUnchanged1.LocationEquals(actualPoint), Is.True); var expectedExtraPointBeyondDitchUnchanged2 = new GeometryPoint(20, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints[adaptedSurfaceLine.CharacteristicPoints.Count - 2]; - Assert.IsTrue(expectedExtraPointBeyondDitchUnchanged2.LocationEquals(actualPoint)); + Assert.That(expectedExtraPointBeyondDitchUnchanged2.LocationEquals(actualPoint), Is.True); Assert.That(surfaceLine.Geometry.Count, Is.EqualTo(12)); Assert.That(adaptedSurfaceLine.Geometry.Count, Is.EqualTo(14)); } @@ -1643,7 +1643,7 @@ double expectedShoulderHeight = Math.Min(shoulderHeight, surfaceLineAdapter.MaxShoulderLevel + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z); var expectedPoint = new GeometryPoint(3.5, expectedShoulderHeight); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); } [Test] @@ -1697,7 +1697,7 @@ double expectedShoulderHeight = Math.Min(shoulderHeight, (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z)); var expectedPoint = new GeometryPoint(3, expectedShoulderHeight); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); } [Test] @@ -1754,7 +1754,7 @@ double expectedShoulderHeight = Math.Min(shoulderHeight, surfaceLineAdapter.MaxShoulderLevel + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z); var expectedPoint = new GeometryPoint(3.5, expectedShoulderHeight); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); } [Test] @@ -1809,13 +1809,13 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedBasePoint = new GeometryPoint(2.263, 0.737); GeometryPoint actualBasePoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedBasePoint.LocationEquals(actualBasePoint)); + Assert.That(expectedBasePoint.LocationEquals(actualBasePoint), Is.True); var expectedTopPoint = new GeometryPoint(7, 0.5); GeometryPoint actualTopPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedTopPoint.LocationEquals(actualTopPoint)); + Assert.That(expectedTopPoint.LocationEquals(actualTopPoint), Is.True); var expectedToePoint = new GeometryPoint(8.5, 0.0); GeometryPoint actualToePoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedToePoint.LocationEquals(actualToePoint)); + Assert.That(expectedToePoint.LocationEquals(actualToePoint), Is.True); } [Test] @@ -1935,13 +1935,13 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedBasePoint = new GeometryPoint(2.5, 0.5); GeometryPoint actualBasePoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedBasePoint.LocationEquals(actualBasePoint)); + Assert.That(expectedBasePoint.LocationEquals(actualBasePoint), Is.True); var expectedTopPoint = new GeometryPoint(7, 0.5); GeometryPoint actualTopPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedTopPoint.LocationEquals(actualTopPoint)); + Assert.That(expectedTopPoint.LocationEquals(actualTopPoint), Is.True); var expectedToePoint = new GeometryPoint(7.5, 0.0); GeometryPoint actualToePoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedToePoint.LocationEquals(actualToePoint)); + Assert.That(expectedToePoint.LocationEquals(actualToePoint), Is.True); } [Test] @@ -1997,13 +1997,13 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedBasePoint = new GeometryPoint(2.5, 0.5); GeometryPoint actualBasePoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedBasePoint.LocationEquals(actualBasePoint)); + Assert.That(expectedBasePoint.LocationEquals(actualBasePoint), Is.True); var expectedTopPoint = new GeometryPoint(7, 0.5); GeometryPoint actualTopPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedTopPoint.LocationEquals(actualTopPoint)); + Assert.That(expectedTopPoint.LocationEquals(actualTopPoint), Is.True); var expectedToePoint = new GeometryPoint(8, 0.0); GeometryPoint actualToePoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedToePoint.LocationEquals(actualToePoint)); + Assert.That(expectedToePoint.LocationEquals(actualToePoint), Is.True); } [Test] @@ -2147,25 +2147,25 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); var expectedShoulderTopInside = new GeometryPoint(4.5, 1); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedShoulderTopInside.LocationEquals(actualPoint)); + Assert.That(expectedShoulderTopInside.LocationEquals(actualPoint), Is.True); var expectedDikeToePolder = new GeometryPoint(6.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedDikeToePolder.LocationEquals(actualPoint)); + Assert.That(expectedDikeToePolder.LocationEquals(actualPoint), Is.True); var expectedDitchDikeSide = new GeometryPoint(7.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchDikeSide); - Assert.IsTrue(expectedDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchDikeSide = new GeometryPoint(8.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchDikeSide); - Assert.IsTrue(expectedBottomDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchPolderSide = new GeometryPoint(9.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchPolderSide); - Assert.IsTrue(expectedBottomDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchPolderSide.LocationEquals(actualPoint), Is.True); var expectedDitchPolderSide = new GeometryPoint(10.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchPolderSide); - Assert.IsTrue(expectedDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchPolderSide.LocationEquals(actualPoint), Is.True); Assert.That(surfaceLine.Geometry.Count, Is.EqualTo(11)); Assert.That(adaptedSurfaceLine.Geometry.Count, Is.EqualTo(11)); } @@ -2259,25 +2259,25 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); var expectedShoulderTopInside = new GeometryPoint(4.5, 1); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedShoulderTopInside.LocationEquals(actualPoint)); + Assert.That(expectedShoulderTopInside.LocationEquals(actualPoint), Is.True); var expectedDikeToePolder = new GeometryPoint(6.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedDikeToePolder.LocationEquals(actualPoint)); + Assert.That(expectedDikeToePolder.LocationEquals(actualPoint), Is.True); var expectedDitchDikeSide = new GeometryPoint(37.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchDikeSide); - Assert.IsTrue(expectedDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchDikeSide = new GeometryPoint(38.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchDikeSide); - Assert.IsTrue(expectedBottomDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchPolderSide = new GeometryPoint(39.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchPolderSide); - Assert.IsTrue(expectedBottomDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchPolderSide.LocationEquals(actualPoint), Is.True); var expectedDitchPolderSide = new GeometryPoint(40.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchPolderSide); - Assert.IsTrue(expectedDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchPolderSide.LocationEquals(actualPoint), Is.True); Assert.That(surfaceLine.Geometry.Count, Is.EqualTo(11)); Assert.That(adaptedSurfaceLine.Geometry.Count, Is.EqualTo(14)); } @@ -2465,25 +2465,25 @@ SurfaceLine2 adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); GeometryPoint actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); - Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); + Assert.That(expectedPoint.LocationEquals(actualPoint), Is.True); var expectedShoulderTopInside = new GeometryPoint(4.5, 1); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); - Assert.IsTrue(expectedShoulderTopInside.LocationEquals(actualPoint)); + Assert.That(expectedShoulderTopInside.LocationEquals(actualPoint), Is.True); var expectedDikeToePolder = new GeometryPoint(6.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); - Assert.IsTrue(expectedDikeToePolder.LocationEquals(actualPoint)); + Assert.That(expectedDikeToePolder.LocationEquals(actualPoint), Is.True); var expectedDitchDikeSide = new GeometryPoint(7.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchDikeSide); - Assert.IsTrue(expectedDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchDikeSide = new GeometryPoint(9.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchDikeSide); - Assert.IsTrue(expectedBottomDitchDikeSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchDikeSide.LocationEquals(actualPoint), Is.True); var expectedBottomDitchPolderSide = new GeometryPoint(11.5, -2); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchPolderSide); - Assert.IsTrue(expectedBottomDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedBottomDitchPolderSide.LocationEquals(actualPoint), Is.True); var expectedDitchPolderSide = new GeometryPoint(13.5, 0); actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchPolderSide); - Assert.IsTrue(expectedDitchPolderSide.LocationEquals(actualPoint)); + Assert.That(expectedDitchPolderSide.LocationEquals(actualPoint), Is.True); Assert.That(surfaceLine.Geometry.Count, Is.EqualTo(11)); Assert.That(adaptedSurfaceLine.Geometry.Count, Is.EqualTo(11)); } @@ -2636,8 +2636,8 @@ private void EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(SurfaceLine2 surfaceLine, SurfaceLine2 adaptedSurfaceLine, double shoulderHeight, double shoulderLength) { const double cTolerance = 0.0000001; - Assert.IsNotNull(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside)); - Assert.IsNotNull(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); + Assert.That(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside), Is.Not.Null); + Assert.That(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside), Is.Not.Null); Assert.That(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside).Z, Is.EqualTo(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z + shoulderHeight).Within(cTolerance)); double intersectionInsideSlopeWithDikeBaseXCoordinate = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).X + (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z); Assert.That(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside).X, Is.EqualTo(intersectionInsideSlopeWithDikeBaseXCoordinate - shoulderHeight).Within(cTolerance));