Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/IMacroStabilityInwardsCalculatorFactory.cs
===================================================================
diff -u -r14ce61e9643e427122685384157ec22ddb9b4422 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/IMacroStabilityInwardsCalculatorFactory.cs (.../IMacroStabilityInwardsCalculatorFactory.cs) (revision 14ce61e9643e427122685384157ec22ddb9b4422)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/IMacroStabilityInwardsCalculatorFactory.cs (.../IMacroStabilityInwardsCalculatorFactory.cs) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -19,7 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/IMacroStabilityInwardsKernelFactory.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/IMacroStabilityInwardsKernelFactory.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/IMacroStabilityInwardsKernelFactory.cs (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -0,0 +1,35 @@
+// 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.
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel
+{
+ ///
+ /// Factory responsible for creating kernels that can be used for performing a macro stability inwards calculation.
+ ///
+ public interface IMacroStabilityInwardsKernelFactory
+ {
+ ///
+ /// Creates an Uplift Van kernel.
+ ///
+ /// A new .
+ IUpliftVanKernel CreateUpliftVanKernel();
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/IUpliftVanKernel.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/IUpliftVanKernel.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/IUpliftVanKernel.cs (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -0,0 +1,147 @@
+// 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;
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel
+{
+ ///
+ /// Interface representing Uplift Van kernel input, methods and output.
+ ///
+ ///
+ /// This interface is introduced for being able to test the conversion of:
+ ///
+ /// - input into kernel input;
+ /// - kernel output into output.
+ ///
+ ///
+ public interface IUpliftVanKernel
+ {
+ ///
+ /// Sets the soil model.
+ ///
+ SoilModel SoilModel { set; }
+
+ ///
+ /// Sets the soil profile.
+ ///
+ SoilProfile2D SoilProfile { set; }
+
+ ///
+ /// Sets the location.
+ ///
+ StabilityLocation Location { set; }
+
+ ///
+ /// Sets the surface line.
+ ///
+ SurfaceLine2 SurfaceLine { set; }
+
+ ///
+ /// Sets the move grid property.
+ ///
+ bool MoveGrid { set; }
+
+ ///
+ /// Sets the maximum slice width.
+ /// [m]
+ ///
+ double MaximumSliceWidth { set; }
+
+ ///
+ /// Sets the slip plane Uplift Van.
+ ///
+ SlipPlaneUpliftVan SlipPlaneUpliftVan { set; }
+
+ ///
+ /// Sets whether the grid is automatically determined or not.
+ ///
+ bool GridAutomaticDetermined { set; }
+
+ ///
+ /// Sets whether zones should be created.
+ ///
+ bool CreateZones { set; }
+
+ ///
+ /// Sets whether forbidden zones are automatically determined or not.
+ ///
+ bool AutomaticForbiddenZones { set; }
+
+ ///
+ /// Sets the minimum depth of the slip plane.
+ /// [m]
+ ///
+ double SlipPlaneMinimumDepth { set; }
+
+ ///
+ /// Sets the minimum length of the slip plane.
+ /// [m]
+ ///
+ double SlipPlaneMinimumLength { set; }
+
+ ///
+ /// Gets the factor of stability.
+ ///
+ double FactoryOfStability { get; }
+
+ ///
+ /// Gets the z value.
+ ///
+ double ZValue { get; }
+
+ ///
+ /// Gets the forbidden zones x entry min.
+ ///
+ double ForbiddenZonesXEntryMin { get; }
+
+ ///
+ /// Gets the forbidden zones x entry max.
+ ///
+ double ForbiddenZonesXEntryMax { get; }
+
+ ///
+ /// Gets whether the forbidden zones are automatically calculated.
+ ///
+ bool ForbiddenZonesAutomaticallyCalculated { get; }
+
+ ///
+ /// Gets whether the grid is automatically calculated.
+ ///
+ bool GridAutomaticallyCalculated { get; }
+
+ ///
+ /// Gets the sliding curve result.
+ ///
+ SlidingDualCircle SlidingCurveResult { get; }
+
+ ///
+ /// Gets the slip plane result.
+ ///
+ SlipPlaneUpliftVan SlipPlaneResult { get; }
+
+ ///
+ /// Performs the Uplift Van calculation.
+ ///
+ void Calculate();
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/MacroStabilityInwardsKernelWrapperFactory.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/MacroStabilityInwardsKernelWrapperFactory.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/MacroStabilityInwardsKernelWrapperFactory.cs (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -0,0 +1,53 @@
+// 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.
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel
+{
+ ///
+ /// Factory that creates kernels that wrap the macro stability inwards kernel.
+ ///
+ public class MacroStabilityInwardsKernelWrapperFactory : IMacroStabilityInwardsKernelFactory
+ {
+ private static IMacroStabilityInwardsKernelFactory instance;
+
+ private MacroStabilityInwardsKernelWrapperFactory() {}
+
+ ///
+ /// Gets or sets an instance of .
+ ///
+ public static IMacroStabilityInwardsKernelFactory Instance
+ {
+ get
+ {
+ return instance ?? (instance = new MacroStabilityInwardsKernelWrapperFactory());
+ }
+ set
+ {
+ instance = value;
+ }
+ }
+
+ public IUpliftVanKernel CreateUpliftVanKernel()
+ {
+ return new UpliftVanKernelWrapper();
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/UpliftVanKernelWrapper.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/UpliftVanKernelWrapper.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Kernel/UpliftVanKernelWrapper.cs (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -0,0 +1,216 @@
+// 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;
+using System.Linq;
+using Deltares.WTIStability;
+using Deltares.WTIStability.Calculation.Wrapper;
+using Deltares.WTIStability.Data.Geo;
+using Deltares.WTIStability.IO;
+using Deltares.WTIStability.Levenberg;
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel
+{
+ ///
+ /// Class that wraps for performing an Uplift Van calculation.
+ ///
+ public class UpliftVanKernelWrapper : IUpliftVanKernel
+ {
+ private readonly WTIStabilityCalculation wtiStabilityCalculation;
+ private readonly StabilityModel stabilityModel;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ public UpliftVanKernelWrapper()
+ {
+ wtiStabilityCalculation = new WTIStabilityCalculation();
+ stabilityModel = new StabilityModel
+ {
+ ModelOption = ModelOptions.UpliftVan,
+ SearchAlgorithm = SearchAlgorithm.Grid,
+ GridOrientation = GridOrientation.Inwards,
+ SlipPlaneConstraints = new SlipPlaneConstraints(),
+ GeneticAlgorithmOptions = new GeneticAlgorithmOptions
+ {
+ EliteCount = 2,
+ PopulationCount = 60,
+ GenerationCount = 50,
+ MutationRate = 0.3,
+ CrossOverScatterFraction = 0,
+ CrossOverSinglePointFraction = 0.7,
+ CrossOverDoublePointFraction = 0.3,
+ MutationJumpFraction = 0,
+ MutationCreepFraction = 0.9,
+ MutationInverseFraction = 0.1,
+ MutationCreepReduction = 0.05,
+ Seed = 1
+ }
+ };
+ }
+
+ public SoilModel SoilModel
+ {
+ set
+ {
+ stabilityModel.SoilModel = value;
+ }
+ }
+
+ public SoilProfile2D SoilProfile
+ {
+ set
+ {
+ stabilityModel.SoilProfile = value;
+ }
+ }
+
+ public StabilityLocation Location
+ {
+ set
+ {
+ stabilityModel.Location = value;
+ }
+ }
+
+ public SurfaceLine2 SurfaceLine
+ {
+ set
+ {
+ stabilityModel.SurfaceLine2 = value;
+ }
+ }
+
+ public bool MoveGrid
+ {
+ set
+ {
+ stabilityModel.MoveGrid = value;
+ }
+ }
+
+ public double MaximumSliceWidth
+ {
+ set
+ {
+ stabilityModel.MaximumSliceWidth = value;
+ }
+ }
+
+ public SlipPlaneUpliftVan SlipPlaneUpliftVan
+ {
+ set
+ {
+ stabilityModel.SlipPlaneUpliftVan = value;
+ }
+ }
+
+ public bool GridAutomaticDetermined
+ {
+ set
+ {
+ stabilityModel.SlipCircle = new SlipCircle
+ {
+ Auto = value
+ };
+ }
+ }
+
+ public bool CreateZones
+ {
+ set
+ {
+ stabilityModel.SlipPlaneConstraints.CreateZones = value;
+ }
+ }
+
+ public bool AutomaticForbiddenZones
+ {
+ set
+ {
+ stabilityModel.SlipPlaneConstraints.AutomaticForbiddenZones = value;
+ }
+ }
+
+ public double SlipPlaneMinimumDepth
+ {
+ set
+ {
+ stabilityModel.SlipPlaneConstraints.SlipPlaneMinDepth = value;
+ }
+ }
+
+ public double SlipPlaneMinimumLength
+ {
+ set
+ {
+ stabilityModel.SlipPlaneConstraints.SlipPlaneMinLength = value;
+ }
+ }
+
+ public double FactoryOfStability { get; private set; }
+
+ public double ZValue { get; private set; }
+
+ public double ForbiddenZonesXEntryMin { get; private set; }
+
+ public double ForbiddenZonesXEntryMax { get; private set; }
+
+ public bool ForbiddenZonesAutomaticallyCalculated { get; private set; }
+
+ public bool GridAutomaticallyCalculated { get; private set; }
+
+ public SlidingDualCircle SlidingCurveResult { get; private set; }
+
+ public SlipPlaneUpliftVan SlipPlaneResult { get; private set; }
+
+ public void Calculate()
+ {
+ wtiStabilityCalculation.InitializeForDeterministic(WTISerializer.Serialize(stabilityModel));
+
+ string messages = wtiStabilityCalculation.Validate();
+ string result = wtiStabilityCalculation.Run();
+
+ ReadResult(result);
+ }
+
+ private void ReadResult(string result)
+ {
+ StabilityAssessmentCalculationResult convertedResult = WTIDeserializer.DeserializeResult(result);
+
+ if (convertedResult.Messages.Any())
+ {
+ throw new Exception();
+ }
+
+ FactoryOfStability = convertedResult.FactorOfSafety;
+ ZValue = convertedResult.ZValue;
+
+ ForbiddenZonesXEntryMin = convertedResult.XMinEntry;
+ ForbiddenZonesXEntryMax = convertedResult.XMaxEntry;
+ ForbiddenZonesAutomaticallyCalculated = convertedResult.AreForbiddenZonesAuto;
+ GridAutomaticallyCalculated = convertedResult.IsGridAuto;
+
+ SlidingCurveResult = (SlidingDualCircle) convertedResult.Curve;
+ SlipPlaneResult = convertedResult.SlipPlaneUpliftVan;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs
===================================================================
diff -u -r90e819fbef3e545d8b192653668e9a92b5a0d350 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs (.../MacroStabilityInwardsCalculator.cs) (revision 90e819fbef3e545d8b192653668e9a92b5a0d350)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs (.../MacroStabilityInwardsCalculator.cs) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -24,7 +24,7 @@
using System.Linq;
using Deltares.WTIStability.Data.Geo;
using Ringtoets.MacroStabilityInwards.KernelWrapper.Creators;
-using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel;
using Ringtoets.MacroStabilityInwards.Primitives.MacroStabilityInwardsSoilUnderSurfaceLine;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorFactory.cs
===================================================================
diff -u -r14ce61e9643e427122685384157ec22ddb9b4422 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorFactory.cs (.../MacroStabilityInwardsCalculatorFactory.cs) (revision 14ce61e9643e427122685384157ec22ddb9b4422)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorFactory.cs (.../MacroStabilityInwardsCalculatorFactory.cs) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -19,7 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj
===================================================================
diff -u -rc4526c07916c8756e52c567f5700e2bcd15b1335 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.csproj) (revision c4526c07916c8756e52c567f5700e2bcd15b1335)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.csproj) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -63,10 +63,10 @@
-
-
-
-
+
+
+
+
Fisheye: Tag a818b067c89f222fa27f864ef9b0c26ba95f40d8 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IMacroStabilityInwardsKernelFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag a818b067c89f222fa27f864ef9b0c26ba95f40d8 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanKernel.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag a818b067c89f222fa27f864ef9b0c26ba95f40d8 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/MacroStabilityInwardsKernelWrapperFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag a818b067c89f222fa27f864ef9b0c26ba95f40d8 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanKernelWrapper.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs
===================================================================
diff -u -rf85a7a802a40cf50b055e0464fa6845c6f5c826c -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision f85a7a802a40cf50b055e0464fa6845c6f5c826c)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -25,7 +25,7 @@
using Ringtoets.Common.Service.ValidationRules;
using Ringtoets.MacroStabilityInwards.Data;
using Ringtoets.MacroStabilityInwards.KernelWrapper;
-using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel;
using Ringtoets.MacroStabilityInwards.Service.Converters;
using Ringtoets.MacroStabilityInwards.Service.Properties;
using RingtoetsCommonServiceResources = Ringtoets.Common.Service.Properties.Resources;
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Kernel/MacroStabilityInwardsKernelWrapperFactoryTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Kernel/MacroStabilityInwardsKernelWrapperFactoryTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Kernel/MacroStabilityInwardsKernelWrapperFactoryTest.cs (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -0,0 +1,82 @@
+// 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.Kernel;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator;
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test.Kernel
+{
+ [TestFixture]
+ public class MacroStabilityInwardsKernelWrapperFactoryTest
+ {
+ [Test]
+ public void Instance_Always_ReturnsAnInstance()
+ {
+ // Call
+ IMacroStabilityInwardsKernelFactory factory = MacroStabilityInwardsKernelWrapperFactory.Instance;
+
+ // Assert
+ Assert.IsInstanceOf(factory);
+ }
+
+ [Test]
+ public void Instance_WhenSetToNull_ReturnsNewInstance()
+ {
+ // Setup
+ IMacroStabilityInwardsKernelFactory firstFactory = MacroStabilityInwardsKernelWrapperFactory.Instance;
+ MacroStabilityInwardsKernelWrapperFactory.Instance = null;
+
+ // Call
+ IMacroStabilityInwardsKernelFactory secondFactory = MacroStabilityInwardsKernelWrapperFactory.Instance;
+
+ // Assert
+ Assert.AreNotSame(firstFactory, secondFactory);
+ }
+
+ [Test]
+ public void Instance_WhenSetToInstance_ReturnsThatInstance()
+ {
+ // Setup
+ var firstFactory = new TestMacroStabilityInwardsKernelFactory();
+ MacroStabilityInwardsKernelWrapperFactory.Instance = firstFactory;
+
+ // Call
+ IMacroStabilityInwardsKernelFactory secondFactory = MacroStabilityInwardsKernelWrapperFactory.Instance;
+
+ // Assert
+ Assert.AreSame(firstFactory, secondFactory);
+ }
+
+ [Test]
+ public void CreateUpliftVanKernel_Always_ReturnsUpliftVanKernel()
+ {
+ // Setup
+ IMacroStabilityInwardsKernelFactory factory = MacroStabilityInwardsKernelWrapperFactory.Instance;
+
+ // Call
+ IUpliftVanKernel upliftVanKernel = factory.CreateUpliftVanKernel();
+
+ // Assert
+ Assert.IsNotNull(upliftVanKernel);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Kernel/UpliftVanKernelWrapperTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Kernel/UpliftVanKernelWrapperTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Kernel/UpliftVanKernelWrapperTest.cs (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -0,0 +1,40 @@
+// 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.Kernel;
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test.Kernel
+{
+ [TestFixture]
+ public class UpliftVanKernelWrapperTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var kernel = new UpliftVanKernelWrapper();
+
+ // Assert
+ Assert.IsInstanceOf(kernel);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorTest.cs
===================================================================
diff -u -rdc76c02e3487559413087637935f008147927ea0 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorTest.cs (.../MacroStabilityInwardsCalculatorTest.cs) (revision dc76c02e3487559413087637935f008147927ea0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorTest.cs (.../MacroStabilityInwardsCalculatorTest.cs) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -27,7 +27,7 @@
using NUnit.Framework;
using Rhino.Mocks;
using Ringtoets.MacroStabilityInwards.KernelWrapper.Creators;
-using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel;
using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil;
using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Result;
using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator;
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj
===================================================================
diff -u -rc4526c07916c8756e52c567f5700e2bcd15b1335 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision c4526c07916c8756e52c567f5700e2bcd15b1335)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -76,9 +76,9 @@
-
+
-
+
Fisheye: Tag a818b067c89f222fa27f864ef9b0c26ba95f40d8 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/SubCalculator/MacroStabilityInwardsKernelWrapperFactoryTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag a818b067c89f222fa27f864ef9b0c26ba95f40d8 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/SubCalculator/UpliftVanKernelWrapperTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfigTest.cs
===================================================================
diff -u -r90e819fbef3e545d8b192653668e9a92b5a0d350 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfigTest.cs (.../MacroStabilityInwardsSubCalculatorFactoryConfigTest.cs) (revision 90e819fbef3e545d8b192653668e9a92b5a0d350)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfigTest.cs (.../MacroStabilityInwardsSubCalculatorFactoryConfigTest.cs) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -21,7 +21,7 @@
using System;
using NUnit.Framework;
-using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel;
using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.SubCalculator
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/TestMacroStabilityInwardsKernelFactoryTest.cs
===================================================================
diff -u -r90e819fbef3e545d8b192653668e9a92b5a0d350 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/TestMacroStabilityInwardsKernelFactoryTest.cs (.../TestMacroStabilityInwardsKernelFactoryTest.cs) (revision 90e819fbef3e545d8b192653668e9a92b5a0d350)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/TestMacroStabilityInwardsKernelFactoryTest.cs (.../TestMacroStabilityInwardsKernelFactoryTest.cs) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -20,7 +20,7 @@
// All rights reserved.
using NUnit.Framework;
-using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel;
using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.SubCalculator
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfig.cs
===================================================================
diff -u -r90e819fbef3e545d8b192653668e9a92b5a0d350 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfig.cs (.../MacroStabilityInwardsSubCalculatorFactoryConfig.cs) (revision 90e819fbef3e545d8b192653668e9a92b5a0d350)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfig.cs (.../MacroStabilityInwardsSubCalculatorFactoryConfig.cs) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -20,7 +20,7 @@
// All rights reserved.
using System;
-using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/TestMacroStabilityInwardsKernelFactory.cs
===================================================================
diff -u -rdc76c02e3487559413087637935f008147927ea0 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/TestMacroStabilityInwardsKernelFactory.cs (.../TestMacroStabilityInwardsKernelFactory.cs) (revision dc76c02e3487559413087637935f008147927ea0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/TestMacroStabilityInwardsKernelFactory.cs (.../TestMacroStabilityInwardsKernelFactory.cs) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -19,7 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanKernelStub.cs
===================================================================
diff -u -rdc76c02e3487559413087637935f008147927ea0 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanKernelStub.cs (.../UpliftVanKernelStub.cs) (revision dc76c02e3487559413087637935f008147927ea0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanKernelStub.cs (.../UpliftVanKernelStub.cs) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -21,7 +21,7 @@
using Deltares.WTIStability;
using Deltares.WTIStability.Data.Geo;
-using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/TestMacroStabilityInwardsCalculatorFactory.cs
===================================================================
diff -u -r14ce61e9643e427122685384157ec22ddb9b4422 -ra818b067c89f222fa27f864ef9b0c26ba95f40d8
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/TestMacroStabilityInwardsCalculatorFactory.cs (.../TestMacroStabilityInwardsCalculatorFactory.cs) (revision 14ce61e9643e427122685384157ec22ddb9b4422)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/TestMacroStabilityInwardsCalculatorFactory.cs (.../TestMacroStabilityInwardsCalculatorFactory.cs) (revision a818b067c89f222fa27f864ef9b0c26ba95f40d8)
@@ -19,7 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernel;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil
{