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