Fisheye: Tag 1b16d1bbb40c8246bd53a1dcfa7803cb92501915 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsGridOutput.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSlipPlaneUpliftVan.cs =================================================================== diff -u -r2c8c5eec330543aab5ece02da4159ce53cfde11b -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSlipPlaneUpliftVan.cs (.../MacroStabilityInwardsSlipPlaneUpliftVan.cs) (revision 2c8c5eec330543aab5ece02da4159ce53cfde11b) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSlipPlaneUpliftVan.cs (.../MacroStabilityInwardsSlipPlaneUpliftVan.cs) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using Ringtoets.MacroStabilityInwards.Primitives; namespace Ringtoets.MacroStabilityInwards.Data { @@ -36,8 +37,8 @@ /// The right grid of the result. /// The tangent lines of the result. /// Thrown when any parameter is null. - public MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridOutput leftGrid, - MacroStabilityInwardsGridOutput rightGrid, + public MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGrid leftGrid, + MacroStabilityInwardsGrid rightGrid, IEnumerable tangentLines) { if (leftGrid == null) @@ -61,12 +62,12 @@ /// /// Gets the left grid result. /// - public MacroStabilityInwardsGridOutput LeftGrid { get; } + public MacroStabilityInwardsGrid LeftGrid { get; } /// /// Gets the right grid result. /// - public MacroStabilityInwardsGridOutput RightGrid { get; } + public MacroStabilityInwardsGrid RightGrid { get; } /// /// Gets the tangent lines result. Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj =================================================================== diff -u -r2c8c5eec330543aab5ece02da4159ce53cfde11b -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision 2c8c5eec330543aab5ece02da4159ce53cfde11b) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -39,7 +39,6 @@ Properties\GlobalAssembly.cs - Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/MacroStabilityInwardsSlipPlaneUpliftVanConverter.cs =================================================================== diff -u -r495c443e6e70674e616ff0bffcf2da22b73a616f -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/MacroStabilityInwardsSlipPlaneUpliftVanConverter.cs (.../MacroStabilityInwardsSlipPlaneUpliftVanConverter.cs) (revision 495c443e6e70674e616ff0bffcf2da22b73a616f) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/MacroStabilityInwardsSlipPlaneUpliftVanConverter.cs (.../MacroStabilityInwardsSlipPlaneUpliftVanConverter.cs) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -20,8 +20,10 @@ // All rights reserved. using System; +using Core.Common.Base.Data; using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.MacroStabilityInwards.KernelWrapper.Result; +using Ringtoets.MacroStabilityInwards.Primitives; namespace Ringtoets.MacroStabilityInwards.Service.Converters { @@ -46,20 +48,23 @@ throw new ArgumentNullException(nameof(result)); } - MacroStabilityInwardsGridOutput leftGrid = ConvertGrid(result.LeftGrid); - MacroStabilityInwardsGridOutput rightGrid = ConvertGrid(result.RightGrid); + MacroStabilityInwardsGrid leftGrid = ConvertGrid(result.LeftGrid); + MacroStabilityInwardsGrid rightGrid = ConvertGrid(result.RightGrid); return new MacroStabilityInwardsSlipPlaneUpliftVan(leftGrid, rightGrid, result.TangentLines); } - private static MacroStabilityInwardsGridOutput ConvertGrid(MacroStabilityInwardsGridResult grid) + private static MacroStabilityInwardsGrid ConvertGrid(MacroStabilityInwardsGridResult grid) { - return new MacroStabilityInwardsGridOutput(grid.XLeft, - grid.XRight, - grid.ZTop, - grid.ZBottom, - grid.NumberOfHorizontalPoints, - grid.NumberOfVerticalPoints); + return new MacroStabilityInwardsGrid + { + XLeft = (RoundedDouble) grid.XLeft, + XRight = (RoundedDouble) grid.XRight, + ZTop = (RoundedDouble) grid.ZTop, + ZBottom = (RoundedDouble) grid.ZBottom, + NumberOfHorizontalPoints = grid.NumberOfHorizontalPoints, + NumberOfVerticalPoints = grid.NumberOfVerticalPoints + }; } } } \ No newline at end of file Fisheye: Tag 1b16d1bbb40c8246bd53a1dcfa7803cb92501915 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsGridOutputTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsOutputTest.cs =================================================================== diff -u -rb8493c6fb982b455e36129083cc009c5c07a7d05 -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsOutputTest.cs (.../MacroStabilityInwardsOutputTest.cs) (revision b8493c6fb982b455e36129083cc009c5c07a7d05) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsOutputTest.cs (.../MacroStabilityInwardsOutputTest.cs) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -25,6 +25,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.Calculation; using Ringtoets.MacroStabilityInwards.Data.TestUtil; +using Ringtoets.MacroStabilityInwards.Primitives.TestUtil; namespace Ringtoets.MacroStabilityInwards.Data.Test { @@ -35,8 +36,8 @@ public void Constructor_SlidingCurveNull_ThrowsArgumentNullException() { // Setup - var slipPlane = new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridOutputTestFactory.Create(), - MacroStabilityInwardsGridOutputTestFactory.Create(), + var slipPlane = new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridTestFactory.Create(), + MacroStabilityInwardsGridTestFactory.Create(), new double[0]); // Call @@ -71,8 +72,8 @@ MacroStabilityInwardsSlidingCircleTestFactory.Create(), new MacroStabilityInwardsSlice[0], 0, 0); - var slipPlane = new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridOutputTestFactory.Create(), - MacroStabilityInwardsGridOutputTestFactory.Create(), + var slipPlane = new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridTestFactory.Create(), + MacroStabilityInwardsGridTestFactory.Create(), new double[0]); // Call @@ -91,8 +92,8 @@ MacroStabilityInwardsSlidingCircleTestFactory.Create(), new MacroStabilityInwardsSlice[0], 0, 0); - var slipPlane = new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridOutputTestFactory.Create(), - MacroStabilityInwardsGridOutputTestFactory.Create(), + var slipPlane = new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridTestFactory.Create(), + MacroStabilityInwardsGridTestFactory.Create(), new double[0]); // Call @@ -111,8 +112,8 @@ MacroStabilityInwardsSlidingCircleTestFactory.Create(), new MacroStabilityInwardsSlice[0], 0, 0); - var slipPlane = new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridOutputTestFactory.Create(), - MacroStabilityInwardsGridOutputTestFactory.Create(), + var slipPlane = new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridTestFactory.Create(), + MacroStabilityInwardsGridTestFactory.Create(), new double[0]); // Call @@ -135,8 +136,8 @@ MacroStabilityInwardsSlidingCircleTestFactory.Create(), new MacroStabilityInwardsSlice[0], 0, 0); - var slipPlane = new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridOutputTestFactory.Create(), - MacroStabilityInwardsGridOutputTestFactory.Create(), + var slipPlane = new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridTestFactory.Create(), + MacroStabilityInwardsGridTestFactory.Create(), new double[0]); var random = new Random(21); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSlipPlaneUpliftVanTest.cs =================================================================== diff -u -r2c8c5eec330543aab5ece02da4159ce53cfde11b -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSlipPlaneUpliftVanTest.cs (.../MacroStabilityInwardsSlipPlaneUpliftVanTest.cs) (revision 2c8c5eec330543aab5ece02da4159ce53cfde11b) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSlipPlaneUpliftVanTest.cs (.../MacroStabilityInwardsSlipPlaneUpliftVanTest.cs) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -22,7 +22,8 @@ using System; using System.Linq; using NUnit.Framework; -using Ringtoets.MacroStabilityInwards.Data.TestUtil; +using Ringtoets.MacroStabilityInwards.Primitives; +using Ringtoets.MacroStabilityInwards.Primitives.TestUtil; namespace Ringtoets.MacroStabilityInwards.Data.Test { @@ -33,7 +34,7 @@ public void Constructor_LeftGridNull_ThrowsArgumentNullException() { // Setup - MacroStabilityInwardsGridOutput grid = MacroStabilityInwardsGridOutputTestFactory.Create(); + MacroStabilityInwardsGrid grid = MacroStabilityInwardsGridTestFactory.Create(); // Call TestDelegate call = () => new MacroStabilityInwardsSlipPlaneUpliftVan(null, grid, Enumerable.Empty()); @@ -47,7 +48,7 @@ public void Constructor_RightGridNull_ThrowsArgumentNullException() { // Setup - MacroStabilityInwardsGridOutput grid = MacroStabilityInwardsGridOutputTestFactory.Create(); + MacroStabilityInwardsGrid grid = MacroStabilityInwardsGridTestFactory.Create(); // Call TestDelegate call = () => new MacroStabilityInwardsSlipPlaneUpliftVan(grid, null, Enumerable.Empty()); @@ -61,8 +62,8 @@ public void Constructor_TangentLinesNull_ThrowsArgumentNullException() { // Setup - MacroStabilityInwardsGridOutput leftGrid = MacroStabilityInwardsGridOutputTestFactory.Create(); - MacroStabilityInwardsGridOutput rightGrid = MacroStabilityInwardsGridOutputTestFactory.Create(); + MacroStabilityInwardsGrid leftGrid = MacroStabilityInwardsGridTestFactory.Create(); + MacroStabilityInwardsGrid rightGrid = MacroStabilityInwardsGridTestFactory.Create(); // Call TestDelegate call = () => new MacroStabilityInwardsSlipPlaneUpliftVan(leftGrid, rightGrid, null); @@ -76,8 +77,8 @@ public void Constructor_ExpectedValues() { // Setup - MacroStabilityInwardsGridOutput leftGrid = MacroStabilityInwardsGridOutputTestFactory.Create(); - MacroStabilityInwardsGridOutput rightGrid = MacroStabilityInwardsGridOutputTestFactory.Create(); + MacroStabilityInwardsGrid leftGrid = MacroStabilityInwardsGridTestFactory.Create(); + MacroStabilityInwardsGrid rightGrid = MacroStabilityInwardsGridTestFactory.Create(); var tangentLines = new[] { 0, Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj =================================================================== diff -u -r2c8c5eec330543aab5ece02da4159ce53cfde11b -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision 2c8c5eec330543aab5ece02da4159ce53cfde11b) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -61,7 +61,6 @@ - Fisheye: Tag 1b16d1bbb40c8246bd53a1dcfa7803cb92501915 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsGridOutputTestFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test.csproj =================================================================== diff -u -r2c8c5eec330543aab5ece02da4159ce53cfde11b -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.TestUtil.Test.csproj) (revision 2c8c5eec330543aab5ece02da4159ce53cfde11b) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.TestUtil.Test.csproj) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -50,7 +50,6 @@ Properties\GlobalAssembly.cs - Fisheye: Tag 1b16d1bbb40c8246bd53a1dcfa7803cb92501915 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsGridOutputTestFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/Ringtoets.MacroStabilityInwards.Data.TestUtil.csproj =================================================================== diff -u -r2c8c5eec330543aab5ece02da4159ce53cfde11b -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/Ringtoets.MacroStabilityInwards.Data.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.Data.TestUtil.csproj) (revision 2c8c5eec330543aab5ece02da4159ce53cfde11b) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/Ringtoets.MacroStabilityInwards.Data.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.Data.TestUtil.csproj) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -50,7 +50,6 @@ Properties\GlobalAssembly.cs - Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestMacroStabilityInwardsOutput.cs =================================================================== diff -u -rb8493c6fb982b455e36129083cc009c5c07a7d05 -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestMacroStabilityInwardsOutput.cs (.../TestMacroStabilityInwardsOutput.cs) (revision b8493c6fb982b455e36129083cc009c5c07a7d05) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/TestMacroStabilityInwardsOutput.cs (.../TestMacroStabilityInwardsOutput.cs) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using Ringtoets.MacroStabilityInwards.Primitives.TestUtil; + namespace Ringtoets.MacroStabilityInwards.Data.TestUtil { /// @@ -37,8 +39,8 @@ : base (new MacroStabilityInwardsSlidingCurve(MacroStabilityInwardsSlidingCircleTestFactory.Create(), MacroStabilityInwardsSlidingCircleTestFactory.Create(), new MacroStabilityInwardsSlice[0], 0, 0), - new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridOutputTestFactory.Create(), - MacroStabilityInwardsGridOutputTestFactory.Create(), + new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridTestFactory.Create(), + MacroStabilityInwardsGridTestFactory.Create(), new double[0]), properties) { Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test/MacroStabilityInwardsGridTestFactoryTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test/MacroStabilityInwardsGridTestFactoryTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test/MacroStabilityInwardsGridTestFactoryTest.cs (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -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 NUnit.Framework; + +namespace Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test +{ + [TestFixture] + public class MacroStabilityInwardsGridTestFactoryTest + { + [Test] + public void Create_Always_ReturnGridWithDefaultValues() + { + // Call + MacroStabilityInwardsGrid grid = MacroStabilityInwardsGridTestFactory.Create(); + + // Assert + Assert.AreEqual(0.1, grid.XLeft); + Assert.AreEqual(0.2, grid.XRight); + Assert.AreEqual(0.3, grid.ZTop); + Assert.AreEqual(0.4, grid.ZBottom); + Assert.AreEqual(1, grid.NumberOfHorizontalPoints); + Assert.AreEqual(2, grid.NumberOfVerticalPoints); + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test.csproj =================================================================== diff -u -r0ca80ea0128c50442c9ab707f715125d65cf7fa0 -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test.csproj) (revision 0ca80ea0128c50442c9ab707f715125d65cf7fa0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.TestUtil.Test.csproj) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -50,6 +50,7 @@ Properties\GlobalAssembly.cs + Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil/MacroStabilityInwardsGridTestFactory.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil/MacroStabilityInwardsGridTestFactory.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil/MacroStabilityInwardsGridTestFactory.cs (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -0,0 +1,49 @@ +// 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 Core.Common.Base.Data; + +namespace Ringtoets.MacroStabilityInwards.Primitives.TestUtil +{ + /// + /// Factory to create simple + /// instances that can be used for testing. + /// + public static class MacroStabilityInwardsGridTestFactory + { + /// + /// Creates a new . + /// + /// The created . + public static MacroStabilityInwardsGrid Create() + { + return new MacroStabilityInwardsGrid + { + XLeft = (RoundedDouble) 0.1, + XRight = (RoundedDouble) 0.2, + ZTop = (RoundedDouble) 0.3, + ZBottom = (RoundedDouble) 0.4, + NumberOfHorizontalPoints = 1, + NumberOfVerticalPoints = 2 + }; + } + } +} Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.csproj =================================================================== diff -u -r0ca80ea0128c50442c9ab707f715125d65cf7fa0 -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.TestUtil.csproj) (revision 0ca80ea0128c50442c9ab707f715125d65cf7fa0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.TestUtil/Ringtoets.MacroStabilityInwards.Primitives.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.TestUtil.csproj) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -46,6 +46,7 @@ Properties\GlobalAssembly.cs + Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/MacroStabilityInwardsSlipPlaneUpliftVanConverterTest.cs =================================================================== diff -u -r495c443e6e70674e616ff0bffcf2da22b73a616f -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/MacroStabilityInwardsSlipPlaneUpliftVanConverterTest.cs (.../MacroStabilityInwardsSlipPlaneUpliftVanConverterTest.cs) (revision 495c443e6e70674e616ff0bffcf2da22b73a616f) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/MacroStabilityInwardsSlipPlaneUpliftVanConverterTest.cs (.../MacroStabilityInwardsSlipPlaneUpliftVanConverterTest.cs) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -24,6 +24,7 @@ using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.MacroStabilityInwards.KernelWrapper.Result; using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Result; +using Ringtoets.MacroStabilityInwards.Primitives; using Ringtoets.MacroStabilityInwards.Service.Converters; namespace Ringtoets.MacroStabilityInwards.Service.Test.Converters @@ -66,7 +67,7 @@ AssertGrid(rightGrid, output.RightGrid); } - private static void AssertGrid(MacroStabilityInwardsGridResult expectedGrid, MacroStabilityInwardsGridOutput actualGrid) + private static void AssertGrid(MacroStabilityInwardsGridResult expectedGrid, MacroStabilityInwardsGrid actualGrid) { Assert.AreEqual(expectedGrid.XLeft, actualGrid.XLeft); Assert.AreEqual(expectedGrid.XRight, actualGrid.XRight); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs =================================================================== diff -u -r37b140fe95b895b99d5d93a853b9bc1b4e96d5e4 -r1b16d1bbb40c8246bd53a1dcfa7803cb92501915 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision 37b140fe95b895b99d5d93a853b9bc1b4e96d5e4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision 1b16d1bbb40c8246bd53a1dcfa7803cb92501915) @@ -31,9 +31,8 @@ using Ringtoets.MacroStabilityInwards.Data.TestUtil; using Ringtoets.MacroStabilityInwards.KernelWrapper; using Ringtoets.MacroStabilityInwards.KernelWrapper.Result; -using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator; using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil; -using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator; +using Ringtoets.MacroStabilityInwards.Primitives; namespace Ringtoets.MacroStabilityInwards.Service.Test { @@ -331,7 +330,7 @@ // Setup using (new MacroStabilityInwardsCalculatorFactoryConfig(new TestMacroStabilityInwardsCalculatorFactory())) { - var calculatorFactory = (TestMacroStabilityInwardsCalculatorFactory)MacroStabilityInwardsCalculatorFactory.Instance; + var calculatorFactory = (TestMacroStabilityInwardsCalculatorFactory) MacroStabilityInwardsCalculatorFactory.Instance; // Precondition Assert.IsTrue(MacroStabilityInwardsCalculationService.Validate(testCalculation)); @@ -466,7 +465,7 @@ AssertGrid(expected.RightGrid, actual.RightGrid); } - private static void AssertGrid(MacroStabilityInwardsGridResult expectedGrid, MacroStabilityInwardsGridOutput actualGrid) + private static void AssertGrid(MacroStabilityInwardsGridResult expectedGrid, MacroStabilityInwardsGrid actualGrid) { Assert.AreEqual(expectedGrid.XLeft, actualGrid.XLeft); Assert.AreEqual(expectedGrid.XRight, actualGrid.XRight);