Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSlipPlaneUpliftVanTest.cs =================================================================== diff -u -r4cbf31a1ae47d22c811e4a8d8f8e6d0f89ddc202 -rdb798825b9ed601ec3716399ce46e19d2ff2d8ea --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSlipPlaneUpliftVanTest.cs (.../MacroStabilityInwardsSlipPlaneUpliftVanTest.cs) (revision 4cbf31a1ae47d22c811e4a8d8f8e6d0f89ddc202) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSlipPlaneUpliftVanTest.cs (.../MacroStabilityInwardsSlipPlaneUpliftVanTest.cs) (revision db798825b9ed601ec3716399ce46e19d2ff2d8ea) @@ -22,8 +22,11 @@ using System; using System.Collections.Generic; using System.Linq; +using Core.Common.Base.Data; using Core.Common.Data.TestUtil; +using Core.Common.TestUtil; using NUnit.Framework; +using Ringtoets.Common.Data.TestUtil; using Ringtoets.MacroStabilityInwards.Data.TestUtil; namespace Ringtoets.MacroStabilityInwards.Data.Test @@ -38,7 +41,7 @@ MacroStabilityInwardsGrid grid = MacroStabilityInwardsGridTestFactory.Create(); // Call - TestDelegate call = () => new MacroStabilityInwardsSlipPlaneUpliftVan(null, grid, Enumerable.Empty()); + TestDelegate call = () => new MacroStabilityInwardsSlipPlaneUpliftVan(null, grid, Enumerable.Empty()); // Assert var exception = Assert.Throws(call); @@ -52,7 +55,7 @@ MacroStabilityInwardsGrid grid = MacroStabilityInwardsGridTestFactory.Create(); // Call - TestDelegate call = () => new MacroStabilityInwardsSlipPlaneUpliftVan(grid, null, Enumerable.Empty()); + TestDelegate call = () => new MacroStabilityInwardsSlipPlaneUpliftVan(grid, null, Enumerable.Empty()); // Assert var exception = Assert.Throws(call); @@ -80,7 +83,11 @@ // Setup MacroStabilityInwardsGrid leftGrid = MacroStabilityInwardsGridTestFactory.Create(); MacroStabilityInwardsGrid rightGrid = MacroStabilityInwardsGridTestFactory.Create(); - IEnumerable tangentLines = Enumerable.Empty(); + IEnumerable tangentLines = new[] + { + (RoundedDouble) 3.4567, + (RoundedDouble) 0.1294 + }; // Call var result = new MacroStabilityInwardsSlipPlaneUpliftVan(leftGrid, rightGrid, tangentLines); @@ -90,7 +97,11 @@ Assert.AreSame(leftGrid, result.LeftGrid); Assert.AreSame(rightGrid, result.RightGrid); - Assert.AreSame(tangentLines, result.TangentLines); + CollectionAssert.AreEqual(new[] + { + 2, 2 + }, result.TangentLines.Select(tl => tl.NumberOfDecimalPlaces)); + CollectionAssert.AreEqual(tangentLines.Select(tl => tl.Value), result.TangentLines.Select(tl => tl.Value), new DoubleWithToleranceComparer(1e-2)); } [Test] @@ -102,7 +113,7 @@ MacroStabilityInwardsGridTestFactory.Create(), new[] { - random.NextDouble() + random.NextRoundedDouble() }); // Call