Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/UpliftVanKernelWrapper.cs =================================================================== diff -u -r5b4fdd217b573664d8ee5b2d3b571159833d4ed5 -r01f2f9421fd1bc8dcef928a2d86da8840da24ef5 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/UpliftVanKernelWrapper.cs (.../UpliftVanKernelWrapper.cs) (revision 5b4fdd217b573664d8ee5b2d3b571159833d4ed5) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/UpliftVanKernelWrapper.cs (.../UpliftVanKernelWrapper.cs) (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -20,14 +20,11 @@ // All rights reserved. using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Xml.Schema; using Deltares.WTIStability; using Deltares.WTIStability.Calculation.Wrapper; using Deltares.WTIStability.Data.Geo; -using Deltares.WTIStability.Data.Standard; using Deltares.WTIStability.IO; using Deltares.WTIStability.Levenberg; Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/Input/UpliftVanCalculatorInputTest.cs =================================================================== diff -u -r9f936b0b29f490a024df02345df182133b1c041a -r01f2f9421fd1bc8dcef928a2d86da8840da24ef5 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/Input/UpliftVanCalculatorInputTest.cs (.../UpliftVanCalculatorInputTest.cs) (revision 9f936b0b29f490a024df02345df182133b1c041a) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/Input/UpliftVanCalculatorInputTest.cs (.../UpliftVanCalculatorInputTest.cs) (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -20,7 +20,6 @@ // All rights reserved. using System; -using System.Linq; using Core.Common.Base.Geometry; using Core.Common.TestUtil; using NUnit.Framework; Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilProfileCreatorTest.cs =================================================================== diff -u -rd3d8ce69baae082c576e3e3a3fedff5b5b57a1e9 -r01f2f9421fd1bc8dcef928a2d86da8840da24ef5 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilProfileCreatorTest.cs (.../SoilProfileCreatorTest.cs) (revision d3d8ce69baae082c576e3e3a3fedff5b5b57a1e9) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilProfileCreatorTest.cs (.../SoilProfileCreatorTest.cs) (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -188,7 +188,7 @@ point7, point8, point9 - }, profile.Geometry.Points, new WTIStabilityPoint2DComparer()); + }, profile.Geometry.Points, new StabilityPointComparer()); CollectionAssert.AreEqual(new[] { outerLoopCurve1, @@ -199,20 +199,20 @@ innerLoop1Curve3, innerLoop2Curve1, innerLoop2Curve2 - }, profile.Geometry.Curves, new WTIStabilityGeometryCurveComparer()); + }, profile.Geometry.Curves, new GeometryCurveComparer()); CollectionAssert.AreEqual(new[] { expectedOuterLoop, expectedInnerLoop1, expectedInnerLoop2 - }, profile.Geometry.Loops, new WTIStabilityGeometryLoopComparer()); + }, profile.Geometry.Loops, new GeometryLoopComparer()); - CollectionAssert.AreEqual(expectedOuterLoop.CurveList, surface.GeometrySurface.OuterLoop.CurveList, new WTIStabilityGeometryCurveComparer()); + CollectionAssert.AreEqual(expectedOuterLoop.CurveList, surface.GeometrySurface.OuterLoop.CurveList, new GeometryCurveComparer()); CollectionAssert.AreEqual(new[] { expectedInnerLoop1, expectedInnerLoop2 - }, surface.GeometrySurface.InnerLoops, new WTIStabilityGeometryLoopComparer()); + }, surface.GeometrySurface.InnerLoops, new GeometryLoopComparer()); Assert.AreEqual(0, profile.Geometry.Left); Assert.AreEqual(0, profile.Geometry.Bottom); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Kernels/UpliftVan/UpliftVanKernelWrapperTest.cs =================================================================== diff -u -r5b4fdd217b573664d8ee5b2d3b571159833d4ed5 -r01f2f9421fd1bc8dcef928a2d86da8840da24ef5 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Kernels/UpliftVan/UpliftVanKernelWrapperTest.cs (.../UpliftVanKernelWrapperTest.cs) (revision 5b4fdd217b573664d8ee5b2d3b571159833d4ed5) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Kernels/UpliftVan/UpliftVanKernelWrapperTest.cs (.../UpliftVanKernelWrapperTest.cs) (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -108,7 +108,7 @@ GeometrySurface = new GeometrySurface { OuterLoop = loop - }, + } } } }, Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/GeometryCurveComparerTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/GeometryCurveComparerTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/GeometryCurveComparerTest.cs (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -0,0 +1,76 @@ +// 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 Deltares.WTIStability.Data.Geo; +using NUnit.Framework; +using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels.UpliftVan.Input; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.Kernels.UpliftVan.Input +{ + [TestFixture] + public class GeometryCurveComparerTest + { + [Test] + public void Compare_SameInstance_ReturnZero() + { + // Setup + var curve = new GeometryCurve(new Point2D(1.1, 2.2), new Point2D(3.3, 4.4)); + + // Call + int result = new GeometryCurveComparer().Compare(curve, curve); + + // Assert + Assert.AreEqual(0, result); + } + + [Test] + public void Compare_EqualCoordinates_ReturnZero() + { + // Setup + const double x1 = 1.1; + const double y1 = 2.2; + const double x2 = 3.3; + const double y2 = 4.4; + var curve1 = new GeometryCurve(new Point2D(x1, y1), new Point2D(x2, y2)); + var curve2 = new GeometryCurve(new Point2D(x1, y1), new Point2D(x2, y2)); + + // Call + int result = new GeometryCurveComparer().Compare(curve1, curve2); + + // Assert + Assert.AreEqual(0, result); + } + + [Test] + public void Compare_DifferentCoordinates_ReturnOne() + { + // Setup + var curve1 = new GeometryCurve(new Point2D(0, 0), new Point2D(1, 1)); + var curve2 = new GeometryCurve(new Point2D(2, 2), new Point2D(3, 3)); + + // Call + int result = new GeometryCurveComparer().Compare(curve1, curve2); + + // Assert + Assert.AreEqual(1, result); + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/GeometryLoopComparerTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/GeometryLoopComparerTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/GeometryLoopComparerTest.cs (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -0,0 +1,127 @@ +// 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 Deltares.WTIStability.Data.Geo; +using NUnit.Framework; +using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels.UpliftVan.Input; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.Kernels.UpliftVan.Input +{ + [TestFixture] + public class GeometryLoopComparerTest + { + [Test] + public void Compare_SameInstance_ReturnZero() + { + // Setup + var loop = new GeometryLoop(); + + // Call + int result = new GeometryLoopComparer().Compare(loop, loop); + + // Assert + Assert.AreEqual(0, result); + } + + [Test] + public void Compare_SameCurveInstance_ReturnZero() + { + // Setup + var curve = new GeometryCurve(new Point2D(1.1, 2.2), new Point2D(3.3, 4.4)); + var loop1 = new GeometryLoop + { + CurveList = + { + curve + } + }; + var loop2 = new GeometryLoop + { + CurveList = + { + curve + } + }; + + // Call + int result = new GeometryLoopComparer().Compare(loop1, loop2); + + // Assert + Assert.AreEqual(0, result); + } + + [Test] + public void Compare_EqualCoordinates_ReturnZero() + { + // Setup + const double x1 = 1.1; + const double y1 = 2.2; + const double x2 = 3.3; + const double y2 = 4.4; + var loop1 = new GeometryLoop + { + CurveList = + { + new GeometryCurve(new Point2D(x1, y1), new Point2D(x2, y2)) + } + }; + var loop2 = new GeometryLoop + { + CurveList = + { + new GeometryCurve(new Point2D(x1, y1), new Point2D(x2, y2)) + } + }; + + // Call + int result = new GeometryLoopComparer().Compare(loop1, loop2); + + // Assert + Assert.AreEqual(0, result); + } + + [Test] + public void Compare_DifferentCoordinates_ReturnOne() + { + // Setup + var loop1 = new GeometryLoop + { + CurveList = + { + new GeometryCurve(new Point2D(0, 0), new Point2D(1, 1)) + } + }; + var loop2 = new GeometryLoop + { + CurveList = + { + new GeometryCurve(new Point2D(2, 2), new Point2D(3, 3)) + } + }; + + // Call + int result = new GeometryLoopComparer().Compare(loop1, loop2); + + // Assert + Assert.AreEqual(1, result); + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/StabilityPointComparerTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/StabilityPointComparerTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/StabilityPointComparerTest.cs (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -0,0 +1,74 @@ +// 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 Deltares.WTIStability.Data.Geo; +using NUnit.Framework; +using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels.UpliftVan.Input; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.Kernels.UpliftVan.Input +{ + [TestFixture] + public class StabilityPointComparerTest + { + [Test] + public void Compare_SameInstance_ReturnZero() + { + // Setup + var point = new Point2D(1.1, 2.2); + + // Call + int result = new StabilityPointComparer().Compare(point, point); + + // Assert + Assert.AreEqual(0, result); + } + + [Test] + public void Compare_EqualCoordinates_ReturnZero() + { + // Setup + const double x = 1.1; + const double y = 2.2; + var point1 = new Point2D(x, y); + var point2 = new Point2D(x, y); + + // Call + int result = new StabilityPointComparer().Compare(point1, point2); + + // Assert + Assert.AreEqual(0, result); + } + + [Test] + public void Compare_DifferentCoordinates_ReturnOne() + { + // Setup + var point1 = new Point2D(0, 0); + var point2 = new Point2D(1, 1); + + // Call + int result = new StabilityPointComparer().Compare(point1, point2); + + // Assert + Assert.AreEqual(1, result); + } + } +} \ No newline at end of file Fisheye: Tag 01f2f9421fd1bc8dcef928a2d86da8840da24ef5 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/WTIStabilityGeometryCurveComparerTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 01f2f9421fd1bc8dcef928a2d86da8840da24ef5 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/WTIStabilityGeometryLoopComparerTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 01f2f9421fd1bc8dcef928a2d86da8840da24ef5 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Kernels/UpliftVan/Input/WTIStabilityPoint2DComparerTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj =================================================================== diff -u -rbcb7ee1318355c19145c87d641d31c97307d59dd -r01f2f9421fd1bc8dcef928a2d86da8840da24ef5 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj) (revision bcb7ee1318355c19145c87d641d31c97307d59dd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj) (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -62,9 +62,9 @@ - - - + + + Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/GeometryCurveComparer.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/GeometryCurveComparer.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/GeometryCurveComparer.cs (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -0,0 +1,50 @@ +// 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.Collections; +using System.Collections.Generic; +using Deltares.WTIStability.Data.Geo; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels.UpliftVan.Input +{ + /// + /// This class compares the coordinates of the + /// of two instances to determine whether + /// they're equal to each other or not. + /// + public class GeometryCurveComparer : IComparer, IComparer + { + private readonly StabilityPointComparer pointComparer = new StabilityPointComparer(); + + public int Compare(object x, object y) + { + return Compare(x as GeometryCurve, y as GeometryCurve); + } + + public int Compare(GeometryCurve x, GeometryCurve y) + { + return pointComparer.Compare(x.HeadPoint, y.HeadPoint) == 0 + && pointComparer.Compare(x.EndPoint, y.EndPoint) == 0 + ? 0 + : 1; + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/GeometryLoopComparer.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/GeometryLoopComparer.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/GeometryLoopComparer.cs (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -0,0 +1,51 @@ +// 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.Collections; +using System.Collections.Generic; +using System.Linq; +using Deltares.WTIStability.Data.Geo; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels.UpliftVan.Input +{ + /// + /// This class compares the coordinates of the + /// of all instances of the + /// instances to determine whether they're equal to each other or not. + /// + public class GeometryLoopComparer : IComparer, IComparer + { + private readonly GeometryCurveComparer curveComparer = new GeometryCurveComparer(); + + public int Compare(object x, object y) + { + return Compare(x as GeometryLoop, y as GeometryLoop); + } + + public int Compare(GeometryLoop x, GeometryLoop y) + { + return x.CurveList.Where((curve, index) => + curveComparer.Compare(curve, y.CurveList[index]) == 1).Any() + ? 1 + : 0; + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/StabilityPointComparer.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/StabilityPointComparer.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/StabilityPointComparer.cs (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -0,0 +1,44 @@ +// 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.Collections; +using System.Collections.Generic; +using Deltares.WTIStability.Data.Geo; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels.UpliftVan.Input +{ + /// + /// This class compares the coordinates of two + /// instances to determine whether they're equal to each other or not. + /// + public class StabilityPointComparer : IComparer, IComparer + { + public int Compare(object x, object y) + { + return Compare(x as Point2D, y as Point2D); + } + + public int Compare(Point2D p0, Point2D p1) + { + return p0.LocationEquals(p1) ? 0 : 1; + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/UpliftVanKernelInputHelper.cs =================================================================== diff -u -r3cefd9c4bd6727e7f34a6f32a55bd7d0e135aecd -r01f2f9421fd1bc8dcef928a2d86da8840da24ef5 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/UpliftVanKernelInputHelper.cs (.../UpliftVanKernelInputHelper.cs) (revision 3cefd9c4bd6727e7f34a6f32a55bd7d0e135aecd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/UpliftVanKernelInputHelper.cs (.../UpliftVanKernelInputHelper.cs) (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -187,7 +187,7 @@ { actual.OuterLoop }.Concat(actual.InnerLoops), - new WTIStabilityGeometryLoopComparer()); + new GeometryLoopComparer()); } /// @@ -223,9 +223,9 @@ { AssertGeometrySurfaces(expected.Surfaces.ToArray(), actual.Surfaces.ToArray()); - CollectionAssert.AreEqual(expected.Loops, actual.Loops, new WTIStabilityGeometryLoopComparer()); - CollectionAssert.AreEqual(expected.Curves, actual.Curves, new WTIStabilityGeometryCurveComparer()); - CollectionAssert.AreEqual(expected.Points, actual.Points, new WTIStabilityPoint2DComparer()); + CollectionAssert.AreEqual(expected.Loops, actual.Loops, new GeometryLoopComparer()); + CollectionAssert.AreEqual(expected.Curves, actual.Curves, new GeometryCurveComparer()); + CollectionAssert.AreEqual(expected.Points, actual.Points, new StabilityPointComparer()); Assert.AreEqual(expected.Bottom, actual.Bottom); Assert.AreEqual(expected.Left, actual.Left); Fisheye: Tag 01f2f9421fd1bc8dcef928a2d86da8840da24ef5 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/WTIStabilityGeometryCurveComparer.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 01f2f9421fd1bc8dcef928a2d86da8840da24ef5 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/WTIStabilityGeometryLoopComparer.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 01f2f9421fd1bc8dcef928a2d86da8840da24ef5 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/WTIStabilityPoint2DComparer.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj =================================================================== diff -u -rbcb7ee1318355c19145c87d641d31c97307d59dd -r01f2f9421fd1bc8dcef928a2d86da8840da24ef5 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj) (revision bcb7ee1318355c19145c87d641d31c97307d59dd) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj) (revision 01f2f9421fd1bc8dcef928a2d86da8840da24ef5) @@ -68,9 +68,9 @@ - - - + + +