Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj
===================================================================
diff -u -r14ce61e9643e427122685384157ec22ddb9b4422 -rf85a7a802a40cf50b055e0464fa6845c6f5c826c
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.csproj) (revision 14ce61e9643e427122685384157ec22ddb9b4422)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.csproj) (revision f85a7a802a40cf50b055e0464fa6845c6f5c826c)
@@ -65,7 +65,7 @@
-
+
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IMacroStabilityInwardsKernelFactory.cs
===================================================================
diff -u -r14ce61e9643e427122685384157ec22ddb9b4422 -rf85a7a802a40cf50b055e0464fa6845c6f5c826c
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IMacroStabilityInwardsKernelFactory.cs (.../IMacroStabilityInwardsKernelFactory.cs) (revision 14ce61e9643e427122685384157ec22ddb9b4422)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IMacroStabilityInwardsKernelFactory.cs (.../IMacroStabilityInwardsKernelFactory.cs) (revision f85a7a802a40cf50b055e0464fa6845c6f5c826c)
@@ -22,7 +22,7 @@
namespace Ringtoets.MacroStabilityInwards.KernelWrapper.SubCalculator
{
///
- /// Factory responsible for creating kernels required for performing a macro stability inwards calculation.
+ /// Factory responsible for creating kernels that can be used for performing a macro stability inwards calculation.
///
public interface IMacroStabilityInwardsKernelFactory
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/MacroStabilityInwardsKernelWrapperFactory.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/MacroStabilityInwardsKernelWrapperFactory.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/MacroStabilityInwardsKernelWrapperFactory.cs (revision f85a7a802a40cf50b055e0464fa6845c6f5c826c)
@@ -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.SubCalculator
+{
+ ///
+ /// 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 UpliftVanCalculator();
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag f85a7a802a40cf50b055e0464fa6845c6f5c826c refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/MacroStabilityInwardsSubCalculatorFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs
===================================================================
diff -u -r774ce2424ba4ccab70c6dad6198472977e2a8ace -rf85a7a802a40cf50b055e0464fa6845c6f5c826c
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision 774ce2424ba4ccab70c6dad6198472977e2a8ace)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision f85a7a802a40cf50b055e0464fa6845c6f5c826c)
@@ -65,7 +65,7 @@
}
MacroStabilityInwardsCalculatorInput macroStabilityInwardsCalculatorInput = CreateInputFromData(calculation.InputParameters);
- IMacroStabilityInwardsCalculator calculator = MacroStabilityInwardsCalculatorFactory.Instance.CreateCalculator(macroStabilityInwardsCalculatorInput, MacroStabilityInwardsSubCalculatorFactory.Instance);
+ IMacroStabilityInwardsCalculator calculator = MacroStabilityInwardsCalculatorFactory.Instance.CreateCalculator(macroStabilityInwardsCalculatorInput, MacroStabilityInwardsKernelWrapperFactory.Instance);
List validationResults = calculator.Validate();
CalculationServiceHelper.LogMessagesAsError(RingtoetsCommonServiceResources.Error_in_validation_0, validationResults.ToArray());
@@ -93,7 +93,7 @@
try
{
- IMacroStabilityInwardsCalculator calculator = MacroStabilityInwardsCalculatorFactory.Instance.CreateCalculator(CreateInputFromData(calculation.InputParameters), MacroStabilityInwardsSubCalculatorFactory.Instance);
+ IMacroStabilityInwardsCalculator calculator = MacroStabilityInwardsCalculatorFactory.Instance.CreateCalculator(CreateInputFromData(calculation.InputParameters), MacroStabilityInwardsKernelWrapperFactory.Instance);
MacroStabilityInwardsCalculatorResult macroStabilityInwardsResult = calculator.Calculate();
calculation.Output = new MacroStabilityInwardsOutput(
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj
===================================================================
diff -u -rdd2c47d012620dd990d481838fb7ee34a4572b48 -rf85a7a802a40cf50b055e0464fa6845c6f5c826c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision dd2c47d012620dd990d481838fb7ee34a4572b48)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision f85a7a802a40cf50b055e0464fa6845c6f5c826c)
@@ -76,7 +76,7 @@
-
+
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/SubCalculator/MacroStabilityInwardsKernelWrapperFactoryTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/SubCalculator/MacroStabilityInwardsKernelWrapperFactoryTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/SubCalculator/MacroStabilityInwardsKernelWrapperFactoryTest.cs (revision f85a7a802a40cf50b055e0464fa6845c6f5c826c)
@@ -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.SubCalculator;
+using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.SubCalculator;
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test.SubCalculator
+{
+ [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 TestMacroStabilityInwardsSubCalculatorFactory();
+ MacroStabilityInwardsKernelWrapperFactory.Instance = firstFactory;
+
+ // Call
+ IMacroStabilityInwardsKernelFactory secondFactory = MacroStabilityInwardsKernelWrapperFactory.Instance;
+
+ // Assert
+ Assert.AreSame(firstFactory, secondFactory);
+ }
+
+ [Test]
+ public void CreateUpliftVanCalculator_Always_ReturnsUpliftVanCalculator()
+ {
+ // Setup
+ IMacroStabilityInwardsKernelFactory factory = MacroStabilityInwardsKernelWrapperFactory.Instance;
+
+ // Call
+ IUpliftVanKernel subCalculator = factory.CreateUpliftVanKernel();
+
+ // Assert
+ Assert.IsNotNull(subCalculator);
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag f85a7a802a40cf50b055e0464fa6845c6f5c826c refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfigTest.cs
===================================================================
diff -u -r14ce61e9643e427122685384157ec22ddb9b4422 -rf85a7a802a40cf50b055e0464fa6845c6f5c826c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfigTest.cs (.../MacroStabilityInwardsSubCalculatorFactoryConfigTest.cs) (revision 14ce61e9643e427122685384157ec22ddb9b4422)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfigTest.cs (.../MacroStabilityInwardsSubCalculatorFactoryConfigTest.cs) (revision f85a7a802a40cf50b055e0464fa6845c6f5c826c)
@@ -47,21 +47,21 @@
using (new MacroStabilityInwardsSubCalculatorFactoryConfig())
{
// Assert
- Assert.IsInstanceOf(MacroStabilityInwardsSubCalculatorFactory.Instance);
+ Assert.IsInstanceOf(MacroStabilityInwardsKernelWrapperFactory.Instance);
}
}
[Test]
public void Dispose_Always_ResetsFactoryToPreviousValue()
{
// Setup
- IMacroStabilityInwardsKernelFactory expectedFactory = MacroStabilityInwardsSubCalculatorFactory.Instance;
+ IMacroStabilityInwardsKernelFactory expectedFactory = MacroStabilityInwardsKernelWrapperFactory.Instance;
// Call
using (new MacroStabilityInwardsSubCalculatorFactoryConfig()) {}
// Assert
- Assert.AreSame(expectedFactory, MacroStabilityInwardsSubCalculatorFactory.Instance);
+ Assert.AreSame(expectedFactory, MacroStabilityInwardsKernelWrapperFactory.Instance);
}
}
}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfig.cs
===================================================================
diff -u -r14ce61e9643e427122685384157ec22ddb9b4422 -rf85a7a802a40cf50b055e0464fa6845c6f5c826c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfig.cs (.../MacroStabilityInwardsSubCalculatorFactoryConfig.cs) (revision 14ce61e9643e427122685384157ec22ddb9b4422)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/MacroStabilityInwardsSubCalculatorFactoryConfig.cs (.../MacroStabilityInwardsSubCalculatorFactoryConfig.cs) (revision f85a7a802a40cf50b055e0464fa6845c6f5c826c)
@@ -26,9 +26,9 @@
{
///
/// This class can be used to set a temporary
- /// for while testing.
+ /// for while testing.
/// Disposing an instance of this class will revert the
- /// .
+ /// .
///
///
/// The following is an example for how to use this class:
@@ -47,21 +47,21 @@
///
/// Creates a new instance of .
/// Sets a to
- ///
+ ///
///
public MacroStabilityInwardsSubCalculatorFactoryConfig()
{
- previousFactory = MacroStabilityInwardsSubCalculatorFactory.Instance;
- MacroStabilityInwardsSubCalculatorFactory.Instance = new TestMacroStabilityInwardsSubCalculatorFactory();
+ previousFactory = MacroStabilityInwardsKernelWrapperFactory.Instance;
+ MacroStabilityInwardsKernelWrapperFactory.Instance = new TestMacroStabilityInwardsSubCalculatorFactory();
}
///
- /// Reverts the to the value
+ /// Reverts the to the value
/// it had at time of construction of the .
///
public void Dispose()
{
- MacroStabilityInwardsSubCalculatorFactory.Instance = previousFactory;
+ MacroStabilityInwardsKernelWrapperFactory.Instance = previousFactory;
}
}
}
\ No newline at end of file
Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/PipingSubCalculatorFactoryTest.cs
===================================================================
diff -u -r1d6eb4a980508dc55fca5a225fe777c7fd3cbd2e -rf85a7a802a40cf50b055e0464fa6845c6f5c826c
--- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/PipingSubCalculatorFactoryTest.cs (.../PipingSubCalculatorFactoryTest.cs) (revision 1d6eb4a980508dc55fca5a225fe777c7fd3cbd2e)
+++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/PipingSubCalculatorFactoryTest.cs (.../PipingSubCalculatorFactoryTest.cs) (revision f85a7a802a40cf50b055e0464fa6845c6f5c826c)
@@ -35,11 +35,11 @@
IPipingSubCalculatorFactory factory = PipingSubCalculatorFactory.Instance;
// Assert
- Assert.IsNotNull(factory);
+ Assert.IsInstanceOf(factory);
}
[Test]
- public void Instance_WhenSetToNull_ReturnsANewInstance()
+ public void Instance_WhenSetToNull_ReturnsNewInstance()
{
// Setup
IPipingSubCalculatorFactory firstFactory = PipingSubCalculatorFactory.Instance;
@@ -67,7 +67,7 @@
}
[Test]
- public void CreateHeaveCalculator_Always_NewHeaveCalculator()
+ public void CreateHeaveCalculator_Always_ReturnsHeaveCalculator()
{
// Setup
IPipingSubCalculatorFactory factory = PipingSubCalculatorFactory.Instance;
@@ -80,7 +80,7 @@
}
[Test]
- public void CreateUpliftCalculator_Always_NewUpliftCalculator()
+ public void CreateUpliftCalculator_Always_ReturnsUpliftCalculator()
{
// Setup
IPipingSubCalculatorFactory factory = PipingSubCalculatorFactory.Instance;
@@ -93,7 +93,7 @@
}
[Test]
- public void CreateSellmeijerCalculator_Always_NewSellmeijerCalculator()
+ public void CreateSellmeijerCalculator_Always_ReturnsSellmeijerCalculator()
{
// Setup
IPipingSubCalculatorFactory factory = PipingSubCalculatorFactory.Instance;
@@ -106,7 +106,7 @@
}
[Test]
- public void CreateEffectiveThicknessCalculator_Always_NewSellmeijerCalculator()
+ public void CreateEffectiveThicknessCalculator_Always_ReturnsEffectiveThicknessCalculator()
{
// Setup
IPipingSubCalculatorFactory factory = PipingSubCalculatorFactory.Instance;
@@ -119,7 +119,7 @@
}
[Test]
- public void CreatPiezometricHeadAtExitCalculator_Always_NewPizometricHeadAtExitCalculator()
+ public void CreatePiezometricHeadAtExitCalculator_Always_ReturnsPiezometricHeadAtExitCalculator()
{
// Setup
IPipingSubCalculatorFactory factory = PipingSubCalculatorFactory.Instance;