Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorTest.cs
===================================================================
diff -u -r90e819fbef3e545d8b192653668e9a92b5a0d350 -rdc76c02e3487559413087637935f008147927ea0
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorTest.cs (.../MacroStabilityInwardsCalculatorTest.cs) (revision 90e819fbef3e545d8b192653668e9a92b5a0d350)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorTest.cs (.../MacroStabilityInwardsCalculatorTest.cs) (revision dc76c02e3487559413087637935f008147927ea0)
@@ -92,8 +92,8 @@
var random = new Random(11);
var input = new MacroStabilityInwardsCalculatorInput(CreateSimpleConstructionProperties());
- var testMacroStabilityInwardsSubCalculatorFactory = new TestMacroStabilityInwardsKernelFactory();
- UpliftVanCalculatorStub calculator = testMacroStabilityInwardsSubCalculatorFactory.LastCreatedUpliftVanKernel;
+ var testMacroStabilityInwardsKernelFactory = new TestMacroStabilityInwardsKernelFactory();
+ UpliftVanKernelStub calculator = testMacroStabilityInwardsKernelFactory.LastCreatedUpliftVanKernel;
calculator.FactoryOfStability = random.NextDouble();
calculator.ZValue = random.NextDouble();
calculator.ForbiddenZonesXEntryMax = random.NextDouble();
@@ -104,7 +104,7 @@
calculator.SlipPlaneResult = SlipPlaneUpliftVanTestFactory.Create();
// Call
- MacroStabilityInwardsCalculatorResult actual = new MacroStabilityInwardsCalculator(input, testMacroStabilityInwardsSubCalculatorFactory).Calculate();
+ MacroStabilityInwardsCalculatorResult actual = new MacroStabilityInwardsCalculator(input, testMacroStabilityInwardsKernelFactory).Calculate();
// Assert
Assert.IsNotNull(actual);
@@ -119,7 +119,7 @@
MacroStabilityInwardsCalculatorResultHelper.AssertSlipPlaneGrid(MacroStabilityInwardsUpliftVanCalculationGridResultCreator.Create(calculator.SlipPlaneResult),
actual.UpliftVanCalculationGrid);
- Assert.IsTrue(testMacroStabilityInwardsSubCalculatorFactory.LastCreatedUpliftVanKernel.Calculated);
+ Assert.IsTrue(testMacroStabilityInwardsKernelFactory.LastCreatedUpliftVanKernel.Calculated);
}
[Test]
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/SubCalculator/MacroStabilityInwardsKernelWrapperFactoryTest.cs
===================================================================
diff -u -r90e819fbef3e545d8b192653668e9a92b5a0d350 -rdc76c02e3487559413087637935f008147927ea0
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/SubCalculator/MacroStabilityInwardsKernelWrapperFactoryTest.cs (.../MacroStabilityInwardsKernelWrapperFactoryTest.cs) (revision 90e819fbef3e545d8b192653668e9a92b5a0d350)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/SubCalculator/MacroStabilityInwardsKernelWrapperFactoryTest.cs (.../MacroStabilityInwardsKernelWrapperFactoryTest.cs) (revision dc76c02e3487559413087637935f008147927ea0)
@@ -67,7 +67,7 @@
}
[Test]
- public void CreateUpliftVanKernel_Always_ReturnsUpliftVanCalculator()
+ public void CreateUpliftVanKernel_Always_ReturnsUpliftVanKernel()
{
// Setup
IMacroStabilityInwardsKernelFactory factory = MacroStabilityInwardsKernelWrapperFactory.Instance;
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj
===================================================================
diff -u -r90e819fbef3e545d8b192653668e9a92b5a0d350 -rdc76c02e3487559413087637935f008147927ea0
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj) (revision 90e819fbef3e545d8b192653668e9a92b5a0d350)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj) (revision dc76c02e3487559413087637935f008147927ea0)
@@ -61,7 +61,7 @@
-
+
Fisheye: Tag dc76c02e3487559413087637935f008147927ea0 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/UpliftVanCalculatorStubTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/UpliftVanKernelStubTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/UpliftVanKernelStubTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/UpliftVanKernelStubTest.cs (revision dc76c02e3487559413087637935f008147927ea0)
@@ -0,0 +1,56 @@
+// 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;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator;
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.SubCalculator
+{
+ [TestFixture]
+ public class UpliftVanKernelStubTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var kernel = new UpliftVanKernelStub();
+
+ // Assert
+ Assert.IsFalse(kernel.Calculated);
+ }
+
+ [Test]
+ public void Calculate_Always_SetCalculatedTrue()
+ {
+ // Setup
+ var kernel = new UpliftVanKernelStub();
+
+ // Precondition
+ Assert.IsFalse(kernel.Calculated);
+
+ // Call
+ kernel.Calculate();
+
+ // Assert
+ Assert.IsTrue(kernel.Calculated);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj
===================================================================
diff -u -r90e819fbef3e545d8b192653668e9a92b5a0d350 -rdc76c02e3487559413087637935f008147927ea0
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj) (revision 90e819fbef3e545d8b192653668e9a92b5a0d350)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj) (revision dc76c02e3487559413087637935f008147927ea0)
@@ -67,7 +67,7 @@
-
+
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/TestMacroStabilityInwardsKernelFactory.cs
===================================================================
diff -u -r90e819fbef3e545d8b192653668e9a92b5a0d350 -rdc76c02e3487559413087637935f008147927ea0
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/TestMacroStabilityInwardsKernelFactory.cs (.../TestMacroStabilityInwardsKernelFactory.cs) (revision 90e819fbef3e545d8b192653668e9a92b5a0d350)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/TestMacroStabilityInwardsKernelFactory.cs (.../TestMacroStabilityInwardsKernelFactory.cs) (revision dc76c02e3487559413087637935f008147927ea0)
@@ -33,13 +33,13 @@
///
public TestMacroStabilityInwardsKernelFactory()
{
- LastCreatedUpliftVanKernel = new UpliftVanCalculatorStub();
+ LastCreatedUpliftVanKernel = new UpliftVanKernelStub();
}
///
/// The last created Uplift Van kernel.
///
- public UpliftVanCalculatorStub LastCreatedUpliftVanKernel { get; }
+ public UpliftVanKernelStub LastCreatedUpliftVanKernel { get; }
public IUpliftVanKernel CreateUpliftVanKernel()
{
Fisheye: Tag dc76c02e3487559413087637935f008147927ea0 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanKernelStub.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanKernelStub.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanKernelStub.cs (revision dc76c02e3487559413087637935f008147927ea0)
@@ -0,0 +1,83 @@
+// 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;
+using Deltares.WTIStability.Data.Geo;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator
+{
+ ///
+ /// Class that represents an Uplift Van kernel stub.
+ ///
+ public class UpliftVanKernelStub : IUpliftVanKernel
+ {
+ ///
+ /// Gets a value indicating whether was called or not.
+ ///
+ public bool Calculated { get; private set; }
+
+ public SoilModel SoilModel { get; set; }
+
+ public SoilProfile2D SoilProfile { get; set; }
+
+ public StabilityLocation Location { get; set; }
+
+ public bool MoveGrid { get; set; }
+
+ public double MaximumSliceWidth { get; set; }
+
+ public SurfaceLine2 SurfaceLine { get; set; }
+
+ public SlipPlaneUpliftVan SlipPlaneUpliftVan { get; set; }
+
+ public bool GridAutomaticDetermined { get; set; }
+
+ public bool CreateZones { get; set; }
+
+ public bool AutomaticForbiddenZones { get; set; }
+
+ public double SlipPlaneMinimumDepth { get; set; }
+
+ public double SlipPlaneMinimumLength { get; set; }
+
+ public double FactoryOfStability { get; set; }
+
+ public double ZValue { get; set; }
+
+ public double ForbiddenZonesXEntryMin { get; set; }
+
+ public double ForbiddenZonesXEntryMax { get; set; }
+
+ public bool ForbiddenZonesAutomaticallyCalculated { get; set; }
+
+ public bool GridAutomaticallyCalculated { get; set; }
+
+ public SlidingDualCircle SlidingCurveResult { get; set; }
+
+ public SlipPlaneUpliftVan SlipPlaneResult { get; set; }
+
+ public void Calculate()
+ {
+ Calculated = true;
+ }
+ }
+}
\ No newline at end of file