Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SurfaceLine2Tests.cs =================================================================== diff -u -r1408 -r1411 --- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SurfaceLine2Tests.cs (.../SurfaceLine2Tests.cs) (revision 1408) +++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SurfaceLine2Tests.cs (.../SurfaceLine2Tests.cs) (revision 1411) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; +using System.Linq; using Deltares.DamEngine.Data.Geometry; using Deltares.DamEngine.Data.Geotechnics; using NUnit.Framework; @@ -45,8 +47,11 @@ AddPointToSurfaceLine(surfaceLine, 24.0, 1.0, CharacteristicPointType.SurfaceLevelInside); surfaceLine.Geometry.SyncCalcPoints(); Assert.AreEqual(10, surfaceLine.CharacteristicPoints.Count); + double tolerance = 0.001; + Assert.AreEqual(2, surfaceLine.CharacteristicPoints.Count(cp => Math.Abs(cp.X - 13.0) < tolerance && Math.Abs(cp.Z - 5.4) < tolerance)); // Because TrafficLoadOutside and DikeTopAtPolder are on the same location, 1 point less should be in the geometry Assert.AreEqual(9, surfaceLine.Geometry.Points.Count); + Assert.AreEqual(1, surfaceLine.Geometry.Points.Count(cp => Math.Abs(cp.X - 13.0) < tolerance && Math.Abs(cp.Z - 5.4) < tolerance)); } private void AddPointToSurfaceLine(SurfaceLine2 surfaceLine, double xCoordinate, double zCoordinate, CharacteristicPointType characteristicPointType)