Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs =================================================================== diff -u -ra1b68821bc11b10c5ec147df7109ffd69e0acbd2 -r5b9f582b5c7815a95c306d624a11c2d771840f91 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs (.../UpliftVanCalculatorTest.cs) (revision a1b68821bc11b10c5ec147df7109ffd69e0acbd2) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs (.../UpliftVanCalculatorTest.cs) (revision 5b9f582b5c7815a95c306d624a11c2d771840f91) @@ -113,7 +113,7 @@ new UpliftVanCalculator(input, testMacroStabilityInwardsKernelFactory).Calculate(); // Assert - Assert.IsTrue(testMacroStabilityInwardsKernelFactory.LastCreatedUpliftVanKernel.Calculated); + Assert.IsTrue(upliftVanKernel.Calculated); } [Test] @@ -143,11 +143,11 @@ }) .ToDictionary(x => x.layer, x => x.soil); - UpliftVanKernelInputAssert.AssertSoilModels(SoilModelCreator.Create(soils), upliftVanKernel.SoilModel); - UpliftVanKernelInputAssert.AssertSoilProfiles(SoilProfileCreator.Create(input.SoilProfile, layersWithSoils), upliftVanKernel.SoilProfile); - UpliftVanKernelInputAssert.AssertStabilityLocations(StabilityLocationCreator.CreateExtreme(input), upliftVanKernel.LocationExtreme); - UpliftVanKernelInputAssert.AssertStabilityLocations(StabilityLocationCreator.CreateDaily(input), upliftVanKernel.LocationDaily); - UpliftVanKernelInputAssert.AssertSurfaceLines(SurfaceLineCreator.Create(input.SurfaceLine, input.LandwardDirection), upliftVanKernel.SurfaceLine); + KernelInputAssert.AssertSoilModels(SoilModelCreator.Create(soils), upliftVanKernel.SoilModel); + KernelInputAssert.AssertSoilProfiles(SoilProfileCreator.Create(input.SoilProfile, layersWithSoils), upliftVanKernel.SoilProfile); + KernelInputAssert.AssertStabilityLocations(StabilityLocationCreator.CreateExtreme(input), upliftVanKernel.LocationExtreme); + KernelInputAssert.AssertStabilityLocations(StabilityLocationCreator.CreateDaily(input), upliftVanKernel.LocationDaily); + KernelInputAssert.AssertSurfaceLines(SurfaceLineCreator.Create(input.SurfaceLine, input.LandwardDirection), upliftVanKernel.SurfaceLine); UpliftVanKernelInputAssert.AssertSlipPlanesUpliftVan(SlipPlaneUpliftVanCreator.Create(input.SlipPlane), upliftVanKernel.SlipPlaneUpliftVan); Assert.AreEqual(input.SlipPlane.GridAutomaticDetermined, upliftVanKernel.GridAutomaticDetermined); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/KernelInputAssert.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/KernelInputAssert.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/KernelInputAssert.cs (revision 5b9f582b5c7815a95c306d624a11c2d771840f91) @@ -0,0 +1,291 @@ +// 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.Linq; +using Deltares.WTIStability; +using Deltares.WTIStability.Data.Geo; +using NUnit.Framework; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels.UpliftVan.Input +{ + /// + /// Class for asserting kernel input. + /// + public static class KernelInputAssert + { + /// + /// Asserts whether is equal to . + /// + /// The expected . + /// The actual . + /// Thrown when + /// is not equal to . + public static void AssertSoilModels(SoilModel expected, SoilModel actual) + { + Assert.AreEqual(expected.Soils.Count, actual.Soils.Count); + + for (var i = 0; i < expected.Soils.Count; i++) + { + AssertSoils(expected.Soils[i], actual.Soils[i]); + } + } + + /// + /// Asserts whether is equal to . + /// + /// The expected . + /// The actual . + /// Thrown when + /// is not equal to . + public static void AssertSoilProfiles(SoilProfile2D expected, SoilProfile2D actual) + { + AssertSoilLayers(expected.Surfaces.ToArray(), actual.Surfaces.ToArray()); + AssertPreconsolidationStresses(expected.PreconsolidationStresses.ToArray(), actual.PreconsolidationStresses.ToArray()); + AssertGeometryDatas(expected.Geometry, actual.Geometry); + } + + /// + /// Asserts whether is equal to . + /// + /// The expected . + /// The actual . + /// Thrown when + /// is not equal to . + public static void AssertStabilityLocations(StabilityLocation expected, StabilityLocation actual) + { + Assert.AreEqual(expected.DikeSoilScenario, actual.DikeSoilScenario); + Assert.AreEqual(expected.WaternetCreationMode, actual.WaternetCreationMode); + Assert.AreEqual(expected.PlLineCreationMethod, actual.PlLineCreationMethod); + Assert.AreEqual(expected.WaterLevelRiver, actual.WaterLevelRiver); + Assert.AreEqual(expected.WaterLevelRiverAverage, actual.WaterLevelRiverAverage); + Assert.AreEqual(expected.WaterLevelPolder, actual.WaterLevelPolder); + Assert.AreEqual(expected.WaterLevelRiverLow, actual.WaterLevelRiverLow); + Assert.AreEqual(expected.DrainageConstructionPresent, actual.DrainageConstructionPresent); + Assert.AreEqual(expected.XCoordMiddleDrainageConstruction, actual.XCoordMiddleDrainageConstruction); + Assert.AreEqual(expected.ZCoordMiddleDrainageConstruction, actual.ZCoordMiddleDrainageConstruction); + Assert.AreEqual(expected.MinimumLevelPhreaticLineAtDikeTopRiver, actual.MinimumLevelPhreaticLineAtDikeTopRiver); + Assert.AreEqual(expected.MinimumLevelPhreaticLineAtDikeTopPolder, actual.MinimumLevelPhreaticLineAtDikeTopPolder); + Assert.AreEqual(expected.UseDefaultOffsets, actual.UseDefaultOffsets); + Assert.AreEqual(expected.PlLineOffsetBelowPointBRingtoetsWti2017, actual.PlLineOffsetBelowPointBRingtoetsWti2017); + Assert.AreEqual(expected.PlLineOffsetBelowDikeTopAtPolder, actual.PlLineOffsetBelowDikeTopAtPolder); + Assert.AreEqual(expected.PlLineOffsetBelowShoulderBaseInside, actual.PlLineOffsetBelowShoulderBaseInside); + Assert.AreEqual(expected.PlLineOffsetBelowDikeToeAtPolder, actual.PlLineOffsetBelowDikeToeAtPolder); + Assert.AreEqual(expected.HeadInPlLine2Outwards, actual.HeadInPlLine2Outwards); + Assert.AreEqual(expected.HeadInPlLine2Inwards, actual.HeadInPlLine2Inwards); + Assert.AreEqual(expected.AdjustPl3And4ForUplift, actual.AdjustPl3And4ForUplift); + Assert.AreEqual(expected.PenetrationLength, actual.PenetrationLength); + Assert.AreEqual(expected.LeakageLengthOutwardsPl3, actual.LeakageLengthOutwardsPl3); + Assert.AreEqual(expected.LeakageLengthInwardsPl3, actual.LeakageLengthInwardsPl3); + Assert.AreEqual(expected.LeakageLengthOutwardsPl4, actual.LeakageLengthOutwardsPl4); + Assert.AreEqual(expected.LeakageLengthInwardsPl4, actual.LeakageLengthInwardsPl4); + } + + /// + /// Asserts whether is equal to . + /// + /// The expected . + /// The actual . + /// Thrown when + /// is not equal to . + public static void AssertSurfaceLines(SurfaceLine2 expected, SurfaceLine2 actual) + { + Assert.AreEqual(expected.Name, actual.Name); + Assert.AreEqual(expected.LandwardDirection, actual.LandwardDirection); + AssertGeometryPointStrings(expected.Geometry, actual.Geometry); + AssertCharacteristicPointSets(expected.CharacteristicPoints, actual.CharacteristicPoints); + } + + /// + /// Asserts whether is equal to . + /// + /// The expected array. + /// The actual array. + /// Thrown when + /// is not equal to . + private static void AssertSoilLayers(SoilLayer2D[] expected, SoilLayer2D[] actual) + { + Assert.AreEqual(expected.Length, actual.Length); + + for (var i = 0; i < expected.Length; i++) + { + SoilLayer2D expectedSurface = expected[i]; + SoilLayer2D actualSurface = actual[i]; + + Assert.AreEqual(expectedSurface.IsAquifer, actualSurface.IsAquifer); + AssertGeometrySurfaces(expectedSurface.GeometrySurface, actualSurface.GeometrySurface); + AssertSoils(expectedSurface.Soil, actualSurface.Soil); + Assert.AreEqual(expectedSurface.WaterpressureInterpolationModel, actualSurface.WaterpressureInterpolationModel); + } + } + + /// + /// Asserts whether is equal to . + /// + /// The expected array. + /// The actual array. + /// Thrown when + /// is not equal to . + private static void AssertPreconsolidationStresses(PreConsolidationStress[] expected, PreConsolidationStress[] actual) + { + Assert.AreEqual(expected.Length, actual.Length); + + for (var i = 0; i < expected.Length; i++) + { + PreConsolidationStress expectedPreconsolidationStress = expected[i]; + PreConsolidationStress actualPreconsolidationStress = actual[i]; + + Assert.AreEqual(expectedPreconsolidationStress.StressValue, actualPreconsolidationStress.StressValue); + Assert.AreEqual(expectedPreconsolidationStress.X, actualPreconsolidationStress.X); + Assert.AreEqual(expectedPreconsolidationStress.Z, actualPreconsolidationStress.Z); + } + } + + /// + /// Asserts whether is equal to . + /// + /// The expected . + /// The actual . + /// Thrown when + /// is not equal to . + private static void AssertGeometrySurfaces(GeometrySurface expected, GeometrySurface actual) + { + CollectionAssert.AreEqual(new[] + { + expected.OuterLoop + }.Concat(expected.InnerLoops), + new[] + { + actual.OuterLoop + }.Concat(actual.InnerLoops), + new GeometryLoopComparer()); + } + + /// + /// Asserts whether is equal to . + /// + /// The expected . + /// The actual . + /// Thrown when + /// is not equal to . + private static void AssertSoils(Soil expected, Soil actual) + { + Assert.AreEqual(expected.Name, actual.Name); + Assert.AreEqual(expected.UsePop, actual.UsePop); + Assert.AreEqual(expected.ShearStrengthModel, actual.ShearStrengthModel); + Assert.AreEqual(expected.AbovePhreaticLevel, actual.AbovePhreaticLevel); + Assert.AreEqual(expected.BelowPhreaticLevel, actual.BelowPhreaticLevel); + Assert.AreEqual(expected.Cohesion, actual.Cohesion); + Assert.AreEqual(expected.FrictionAngle, actual.FrictionAngle); + Assert.AreEqual(expected.RatioCuPc, actual.RatioCuPc); + Assert.AreEqual(expected.StrengthIncreaseExponent, actual.StrengthIncreaseExponent); + Assert.AreEqual(expected.PoP, actual.PoP); + Assert.AreEqual(expected.DilatancyType, actual.DilatancyType); + } + + /// + /// Asserts whether is equal to . + /// + /// The expected . + /// The actual . + /// Thrown when + /// is not equal to . + private static void AssertGeometryDatas(GeometryData expected, GeometryData actual) + { + AssertGeometrySurfaces(expected.Surfaces.ToArray(), actual.Surfaces.ToArray()); + + 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); + Assert.AreEqual(expected.Right, actual.Right); + } + + /// + /// Asserts whether is equal to . + /// + /// The expected array. + /// The actual array. + /// Thrown when + /// is not equal to . + private static void AssertGeometrySurfaces(GeometrySurface[] expected, GeometrySurface[] actual) + { + Assert.AreEqual(expected.Length, actual.Length); + + for (var i = 0; i < expected.Length; i++) + { + AssertGeometrySurfaces(expected[i], actual[i]); + } + } + + /// + /// Asserts whether is equal to . + /// + /// The expected . + /// The actual . + /// Thrown when + /// is not equal to . + private static void AssertCharacteristicPointSets(CharacteristicPointSet expected, CharacteristicPointSet actual) + { + Assert.AreEqual(expected.Count, actual.Count); + + for (var i = 0; i < expected.Count; i++) + { + CharacteristicPoint expectedCharacteristicPoint = expected[i]; + CharacteristicPoint actualCharacteristicPoint = actual[i]; + + AssertGeometryPoints(expectedCharacteristicPoint.GeometryPoint, actualCharacteristicPoint.GeometryPoint); + Assert.AreEqual(expectedCharacteristicPoint.CharacteristicPointType, actualCharacteristicPoint.CharacteristicPointType); + } + } + + /// + /// Asserts whether is equal to . + /// + /// The expected . + /// The actual . + /// Thrown when + /// is not equal to . + private static void AssertGeometryPointStrings(GeometryPointString expected, GeometryPointString actual) + { + Assert.AreEqual(expected.Points.Count, actual.Points.Count); + + for (var i = 0; i < expected.Points.Count; i++) + { + AssertGeometryPoints(expected.Points[i], actual.Points[i]); + } + } + + /// + /// Asserts whether is equal to . + /// + /// The expected . + /// The actual . + /// Thrown when + /// is not equal to . + private static void AssertGeometryPoints(GeometryPoint expected, GeometryPoint actual) + { + Assert.AreEqual(expected.X, actual.X); + Assert.AreEqual(expected.Z, actual.Z); + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/UpliftVanKernelInputAssert.cs =================================================================== diff -u -r6df1ecea3d12b0f99e240a6d71be19f5ea29bf69 -r5b9f582b5c7815a95c306d624a11c2d771840f91 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/UpliftVanKernelInputAssert.cs (.../UpliftVanKernelInputAssert.cs) (revision 6df1ecea3d12b0f99e240a6d71be19f5ea29bf69) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/Input/UpliftVanKernelInputAssert.cs (.../UpliftVanKernelInputAssert.cs) (revision 5b9f582b5c7815a95c306d624a11c2d771840f91) @@ -34,88 +34,6 @@ /// /// Asserts whether is equal to . /// - /// The expected . - /// The actual . - /// Thrown when - /// is not equal to . - public static void AssertSoilModels(SoilModel expected, SoilModel actual) - { - Assert.AreEqual(expected.Soils.Count, actual.Soils.Count); - - for (var i = 0; i < expected.Soils.Count; i++) - { - AssertSoils(expected.Soils[i], actual.Soils[i]); - } - } - - /// - /// Asserts whether is equal to . - /// - /// The expected . - /// The actual . - /// Thrown when - /// is not equal to . - public static void AssertSoilProfiles(SoilProfile2D expected, SoilProfile2D actual) - { - AssertSoilLayers(expected.Surfaces.ToArray(), actual.Surfaces.ToArray()); - AssertPreconsolidationStresses(expected.PreconsolidationStresses.ToArray(), actual.PreconsolidationStresses.ToArray()); - AssertGeometryDatas(expected.Geometry, actual.Geometry); - } - - /// - /// Asserts whether is equal to . - /// - /// The expected . - /// The actual . - /// Thrown when - /// is not equal to . - public static void AssertStabilityLocations(StabilityLocation expected, StabilityLocation actual) - { - Assert.AreEqual(expected.DikeSoilScenario, actual.DikeSoilScenario); - Assert.AreEqual(expected.WaternetCreationMode, actual.WaternetCreationMode); - Assert.AreEqual(expected.PlLineCreationMethod, actual.PlLineCreationMethod); - Assert.AreEqual(expected.WaterLevelRiver, actual.WaterLevelRiver); - Assert.AreEqual(expected.WaterLevelRiverAverage, actual.WaterLevelRiverAverage); - Assert.AreEqual(expected.WaterLevelPolder, actual.WaterLevelPolder); - Assert.AreEqual(expected.WaterLevelRiverLow, actual.WaterLevelRiverLow); - Assert.AreEqual(expected.DrainageConstructionPresent, actual.DrainageConstructionPresent); - Assert.AreEqual(expected.XCoordMiddleDrainageConstruction, actual.XCoordMiddleDrainageConstruction); - Assert.AreEqual(expected.ZCoordMiddleDrainageConstruction, actual.ZCoordMiddleDrainageConstruction); - Assert.AreEqual(expected.MinimumLevelPhreaticLineAtDikeTopRiver, actual.MinimumLevelPhreaticLineAtDikeTopRiver); - Assert.AreEqual(expected.MinimumLevelPhreaticLineAtDikeTopPolder, actual.MinimumLevelPhreaticLineAtDikeTopPolder); - Assert.AreEqual(expected.UseDefaultOffsets, actual.UseDefaultOffsets); - Assert.AreEqual(expected.PlLineOffsetBelowPointBRingtoetsWti2017, actual.PlLineOffsetBelowPointBRingtoetsWti2017); - Assert.AreEqual(expected.PlLineOffsetBelowDikeTopAtPolder, actual.PlLineOffsetBelowDikeTopAtPolder); - Assert.AreEqual(expected.PlLineOffsetBelowShoulderBaseInside, actual.PlLineOffsetBelowShoulderBaseInside); - Assert.AreEqual(expected.PlLineOffsetBelowDikeToeAtPolder, actual.PlLineOffsetBelowDikeToeAtPolder); - Assert.AreEqual(expected.HeadInPlLine2Outwards, actual.HeadInPlLine2Outwards); - Assert.AreEqual(expected.HeadInPlLine2Inwards, actual.HeadInPlLine2Inwards); - Assert.AreEqual(expected.AdjustPl3And4ForUplift, actual.AdjustPl3And4ForUplift); - Assert.AreEqual(expected.PenetrationLength, actual.PenetrationLength); - Assert.AreEqual(expected.LeakageLengthOutwardsPl3, actual.LeakageLengthOutwardsPl3); - Assert.AreEqual(expected.LeakageLengthInwardsPl3, actual.LeakageLengthInwardsPl3); - Assert.AreEqual(expected.LeakageLengthOutwardsPl4, actual.LeakageLengthOutwardsPl4); - Assert.AreEqual(expected.LeakageLengthInwardsPl4, actual.LeakageLengthInwardsPl4); - } - - /// - /// Asserts whether is equal to . - /// - /// The expected . - /// The actual . - /// Thrown when - /// is not equal to . - public static void AssertSurfaceLines(SurfaceLine2 expected, SurfaceLine2 actual) - { - Assert.AreEqual(expected.Name, actual.Name); - Assert.AreEqual(expected.LandwardDirection, actual.LandwardDirection); - AssertGeometryPointStrings(expected.Geometry, actual.Geometry); - AssertCharacteristicPointSets(expected.CharacteristicPoints, actual.CharacteristicPoints); - } - - /// - /// Asserts whether is equal to . - /// /// The expected . /// The actual . /// Thrown when @@ -130,181 +48,6 @@ /// /// Asserts whether is equal to . /// - /// The expected array. - /// The actual array. - /// Thrown when - /// is not equal to . - private static void AssertSoilLayers(SoilLayer2D[] expected, SoilLayer2D[] actual) - { - Assert.AreEqual(expected.Length, actual.Length); - - for (var i = 0; i < expected.Length; i++) - { - SoilLayer2D expectedSurface = expected[i]; - SoilLayer2D actualSurface = actual[i]; - - Assert.AreEqual(expectedSurface.IsAquifer, actualSurface.IsAquifer); - AssertGeometrySurfaces(expectedSurface.GeometrySurface, actualSurface.GeometrySurface); - AssertSoils(expectedSurface.Soil, actualSurface.Soil); - Assert.AreEqual(expectedSurface.WaterpressureInterpolationModel, actualSurface.WaterpressureInterpolationModel); - } - } - - /// - /// Asserts whether is equal to . - /// - /// The expected array. - /// The actual array. - /// Thrown when - /// is not equal to . - private static void AssertPreconsolidationStresses(PreConsolidationStress[] expected, PreConsolidationStress[] actual) - { - Assert.AreEqual(expected.Length, actual.Length); - - for (var i = 0; i < expected.Length; i++) - { - PreConsolidationStress expectedPreconsolidationStress = expected[i]; - PreConsolidationStress actualPreconsolidationStress = actual[i]; - - Assert.AreEqual(expectedPreconsolidationStress.StressValue, actualPreconsolidationStress.StressValue); - Assert.AreEqual(expectedPreconsolidationStress.X, actualPreconsolidationStress.X); - Assert.AreEqual(expectedPreconsolidationStress.Z, actualPreconsolidationStress.Z); - } - } - - /// - /// Asserts whether is equal to . - /// - /// The expected . - /// The actual . - /// Thrown when - /// is not equal to . - private static void AssertGeometrySurfaces(GeometrySurface expected, GeometrySurface actual) - { - CollectionAssert.AreEqual(new[] - { - expected.OuterLoop - }.Concat(expected.InnerLoops), - new[] - { - actual.OuterLoop - }.Concat(actual.InnerLoops), - new GeometryLoopComparer()); - } - - /// - /// Asserts whether is equal to . - /// - /// The expected . - /// The actual . - /// Thrown when - /// is not equal to . - private static void AssertSoils(Soil expected, Soil actual) - { - Assert.AreEqual(expected.Name, actual.Name); - Assert.AreEqual(expected.UsePop, actual.UsePop); - Assert.AreEqual(expected.ShearStrengthModel, actual.ShearStrengthModel); - Assert.AreEqual(expected.AbovePhreaticLevel, actual.AbovePhreaticLevel); - Assert.AreEqual(expected.BelowPhreaticLevel, actual.BelowPhreaticLevel); - Assert.AreEqual(expected.Cohesion, actual.Cohesion); - Assert.AreEqual(expected.FrictionAngle, actual.FrictionAngle); - Assert.AreEqual(expected.RatioCuPc, actual.RatioCuPc); - Assert.AreEqual(expected.StrengthIncreaseExponent, actual.StrengthIncreaseExponent); - Assert.AreEqual(expected.PoP, actual.PoP); - Assert.AreEqual(expected.DilatancyType, actual.DilatancyType); - } - - /// - /// Asserts whether is equal to . - /// - /// The expected . - /// The actual . - /// Thrown when - /// is not equal to . - private static void AssertGeometryDatas(GeometryData expected, GeometryData actual) - { - AssertGeometrySurfaces(expected.Surfaces.ToArray(), actual.Surfaces.ToArray()); - - 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); - Assert.AreEqual(expected.Right, actual.Right); - } - - /// - /// Asserts whether is equal to . - /// - /// The expected array. - /// The actual array. - /// Thrown when - /// is not equal to . - private static void AssertGeometrySurfaces(GeometrySurface[] expected, GeometrySurface[] actual) - { - Assert.AreEqual(expected.Length, actual.Length); - - for (var i = 0; i < expected.Length; i++) - { - AssertGeometrySurfaces(expected[i], actual[i]); - } - } - - /// - /// Asserts whether is equal to . - /// - /// The expected . - /// The actual . - /// Thrown when - /// is not equal to . - private static void AssertCharacteristicPointSets(CharacteristicPointSet expected, CharacteristicPointSet actual) - { - Assert.AreEqual(expected.Count, actual.Count); - - for (var i = 0; i < expected.Count; i++) - { - CharacteristicPoint expectedCharacteristicPoint = expected[i]; - CharacteristicPoint actualCharacteristicPoint = actual[i]; - - AssertGeometryPoints(expectedCharacteristicPoint.GeometryPoint, actualCharacteristicPoint.GeometryPoint); - Assert.AreEqual(expectedCharacteristicPoint.CharacteristicPointType, actualCharacteristicPoint.CharacteristicPointType); - } - } - - /// - /// Asserts whether is equal to . - /// - /// The expected . - /// The actual . - /// Thrown when - /// is not equal to . - private static void AssertGeometryPointStrings(GeometryPointString expected, GeometryPointString actual) - { - Assert.AreEqual(expected.Points.Count, actual.Points.Count); - - for (var i = 0; i < expected.Points.Count; i++) - { - AssertGeometryPoints(expected.Points[i], actual.Points[i]); - } - } - - /// - /// Asserts whether is equal to . - /// - /// The expected . - /// The actual . - /// Thrown when - /// is not equal to . - private static void AssertGeometryPoints(GeometryPoint expected, GeometryPoint actual) - { - Assert.AreEqual(expected.X, actual.X); - Assert.AreEqual(expected.Z, actual.Z); - } - - /// - /// Asserts whether is equal to . - /// /// The expected . /// The actual . /// Thrown when Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj =================================================================== diff -u -r2f475a02ae31bb68d351db98e3e7e82cb7456291 -r5b9f582b5c7815a95c306d624a11c2d771840f91 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj) (revision 2f475a02ae31bb68d351db98e3e7e82cb7456291) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj) (revision 5b9f582b5c7815a95c306d624a11c2d771840f91) @@ -63,6 +63,7 @@ +