Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailureMechanismSectionAssemblyCalculator.cs
===================================================================
diff -u -rebf1043695f8e56bb1e0659af3565344f70cd33f -rbaf9e7a385fd374010f076868ddccc77b4da17ce
--- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailureMechanismSectionAssemblyCalculator.cs (.../IFailureMechanismSectionAssemblyCalculator.cs) (revision ebf1043695f8e56bb1e0659af3565344f70cd33f)
+++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailureMechanismSectionAssemblyCalculator.cs (.../IFailureMechanismSectionAssemblyCalculator.cs) (revision baf9e7a385fd374010f076868ddccc77b4da17ce)
@@ -21,7 +21,6 @@
using System;
using System.ComponentModel;
-using Assembly.Kernel.Model;
using Ringtoets.AssemblyTool.Data;
using Ringtoets.Common.Primitives;
@@ -64,8 +63,8 @@
///
/// The to assemble for.
/// The calculated probability.
- /// The object containing the input parameters required to construct
- /// the and .
+ /// The object containing the input parameters for
+ /// determining the assembly categories.
/// A .
/// Thrown when is
/// an invalid .
@@ -83,8 +82,8 @@
/// The to assemble for.
/// The calculated probability.
/// The 'N' parameter used to factor in the 'length effect'.
- /// The object containing the input parameters required to construct
- /// the and .
+ /// The object containing the input parameters for
+ /// determining the assembly categories.
/// A .
/// Thrown when
/// an error occurs when performing the assembly.
@@ -132,8 +131,8 @@
/// The
/// to assemble for.
/// The calculated probability.
- /// The object containing the input parameters required to construct
- /// the and .
+ /// The object containing the input parameters for
+ /// determining the assembly categories.
/// A .
/// Thrown when
/// an error occurs when performing the assembly.
@@ -147,8 +146,8 @@
/// The
/// to assemble for.
/// The calculated probability.
- /// The object containing the input parameters required to construct
- /// the and .
+ /// The object containing the input parameters for
+ /// determining the assembly categories.
/// A .
/// Thrown when
/// an error occurs when performing the assembly.
@@ -163,8 +162,8 @@
/// to assemble for.
/// The calculated probability.
/// The 'N' parameter used to factor in the 'length effect'.
- /// The object containing the input parameters required to construct
- /// the and .
+ /// The object containing the input parameters for
+ /// determining the assembly categories.
/// A .
/// Thrown when
/// an error occurs when performing the assembly.
Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Categories/AssemblyCategoriesCalculator.cs
===================================================================
diff -u -r8504a727494410ae43855ce2fbae498fc6e06d99 -rbaf9e7a385fd374010f076868ddccc77b4da17ce
--- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Categories/AssemblyCategoriesCalculator.cs (.../AssemblyCategoriesCalculator.cs) (revision 8504a727494410ae43855ce2fbae498fc6e06d99)
+++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Categories/AssemblyCategoriesCalculator.cs (.../AssemblyCategoriesCalculator.cs) (revision baf9e7a385fd374010f076868ddccc77b4da17ce)
@@ -68,17 +68,15 @@
}
}
- public IEnumerable CalculateFailureMechanismSectionCategories(double signalingNorm,
- double lowerLimitNorm,
- double failureMechanismContribution,
- double n)
+ public IEnumerable CalculateFailureMechanismSectionCategories(
+ AssemblyCategoriesInput assemblyCategoriesInput)
{
try
{
ICategoryLimitsCalculator kernel = factory.CreateAssemblyCategoriesKernel();
IEnumerable output = kernel.CalculateFmSectionCategoryLimitsWbi01(
- new AssessmentSection(1, signalingNorm, lowerLimitNorm),
- new FailureMechanism(n, failureMechanismContribution));
+ new AssessmentSection(1, assemblyCategoriesInput.SignalingNorm, assemblyCategoriesInput.LowerLimitNorm),
+ new FailureMechanism(assemblyCategoriesInput.N, assemblyCategoriesInput.FailureMechanismContribution));
return AssemblyCategoryCreator.CreateFailureMechanismSectionAssemblyCategories(output);
}
@@ -88,17 +86,15 @@
}
}
- public IEnumerable CalculateGeotechnicFailureMechanismSectionCategories(double signalingNorm,
- double lowerLimitNorm,
- double failureMechanismContribution,
- double n)
+ public IEnumerable CalculateGeotechnicFailureMechanismSectionCategories(
+ AssemblyCategoriesInput assemblyCategoriesInput)
{
try
{
ICategoryLimitsCalculator kernel = factory.CreateAssemblyCategoriesKernel();
IEnumerable output = kernel.CalculateFmSectionCategoryLimitsWbi02(
- new AssessmentSection(1, signalingNorm, lowerLimitNorm),
- new FailureMechanism(n, failureMechanismContribution));
+ new AssessmentSection(1, assemblyCategoriesInput.SignalingNorm, assemblyCategoriesInput.LowerLimitNorm),
+ new FailureMechanism(assemblyCategoriesInput.N, assemblyCategoriesInput.FailureMechanismContribution));
return AssemblyCategoryCreator.CreateFailureMechanismSectionAssemblyCategories(output);
}
Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Categories/IAssemblyCategoriesCalculator.cs
===================================================================
diff -u -rb29487c198d87b176783f2396c2b59cd76b9f246 -rbaf9e7a385fd374010f076868ddccc77b4da17ce
--- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Categories/IAssemblyCategoriesCalculator.cs (.../IAssemblyCategoriesCalculator.cs) (revision b29487c198d87b176783f2396c2b59cd76b9f246)
+++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Calculators/Categories/IAssemblyCategoriesCalculator.cs (.../IAssemblyCategoriesCalculator.cs) (revision baf9e7a385fd374010f076868ddccc77b4da17ce)
@@ -44,29 +44,25 @@
///
/// Performs the calculation for getting the failure mechanism section categories.
///
- /// The signaling norm to calculate with.
- /// The lower limit norm to calculate with.
- /// The failure mechanism contribution to calculate with.
- /// The 'N' parameter used to factor in the 'length effect'.
+ /// The object containing the input parameters for
+ /// determining the assembly categories.
/// An with categories of
/// .
/// Thrown when an error occurs
/// when performing the calculation.
IEnumerable CalculateFailureMechanismSectionCategories(
- double signalingNorm, double lowerLimitNorm, double failureMechanismContribution, double n);
+ AssemblyCategoriesInput assemblyCategoriesInput);
///
/// Performs the calculation for getting the geotechnic failure mechanism section categories.
///
- /// The signaling norm to calculate with.
- /// The lower limit norm to calculate with.
- /// The failure mechanism contribution to calculate with.
- /// The 'N' parameter used to factor in the 'length effect'.
+ /// The object containing the input parameters for
+ /// determining the assembly categories.
/// An with categories of
/// .
/// Thrown when an error occurs
/// when performing the calculation.
IEnumerable CalculateGeotechnicFailureMechanismSectionCategories(
- double signalingNorm, double lowerLimitNorm, double failureMechanismContribution, double n);
+ AssemblyCategoriesInput assemblyCategoriesInput);
}
}
\ No newline at end of file
Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Calculators/Categories/AssemblyCategoriesCalculatorTest.cs
===================================================================
diff -u -rde0bcd3a13294ced7aa554b65b4049c9d3cfd0ff -rbaf9e7a385fd374010f076868ddccc77b4da17ce
--- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Calculators/Categories/AssemblyCategoriesCalculatorTest.cs (.../AssemblyCategoriesCalculatorTest.cs) (revision de0bcd3a13294ced7aa554b65b4049c9d3cfd0ff)
+++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Calculators/Categories/AssemblyCategoriesCalculatorTest.cs (.../AssemblyCategoriesCalculatorTest.cs) (revision baf9e7a385fd374010f076868ddccc77b4da17ce)
@@ -147,10 +147,10 @@
{
// Setup
var random = new Random(11);
- double lowerLimitNorm = random.NextDouble(0.5, 1.0);
- double signalingNorm = random.NextDouble(0.0, 0.4);
- double failureMechanismContribution = random.NextDouble();
- double n = random.NextDouble(1, 5);
+ var assemblyCategoriesInput = new AssemblyCategoriesInput(random.NextDouble(1, 5),
+ random.NextDouble(),
+ random.NextDouble(0.0, 0.4),
+ random.NextDouble(0.5, 1.0));
using (new AssemblyToolKernelFactoryConfig())
{
@@ -161,13 +161,13 @@
var calculator = new AssemblyCategoriesCalculator(factory);
// Call
- calculator.CalculateFailureMechanismSectionCategories(signalingNorm, lowerLimitNorm, failureMechanismContribution, n);
+ calculator.CalculateFailureMechanismSectionCategories(assemblyCategoriesInput);
// Assert
- Assert.AreEqual(lowerLimitNorm, kernel.LowerLimitNorm);
- Assert.AreEqual(signalingNorm, kernel.SignalingNorm);
- Assert.AreEqual(failureMechanismContribution, kernel.FailureMechanismContribution);
- Assert.AreEqual(n, kernel.N);
+ Assert.AreEqual(assemblyCategoriesInput.LowerLimitNorm, kernel.LowerLimitNorm);
+ Assert.AreEqual(assemblyCategoriesInput.SignalingNorm, kernel.SignalingNorm);
+ Assert.AreEqual(assemblyCategoriesInput.FailureMechanismContribution, kernel.FailureMechanismContribution);
+ Assert.AreEqual(assemblyCategoriesInput.N, kernel.N);
}
}
@@ -191,8 +191,8 @@
var calculator = new AssemblyCategoriesCalculator(factory);
// Call
- IEnumerable result = calculator.CalculateFailureMechanismSectionCategories(signalingNorm, lowerLimitNorm,
- failureMechanismContribution, n);
+ IEnumerable result = calculator.CalculateFailureMechanismSectionCategories(
+ new AssemblyCategoriesInput(n, failureMechanismContribution, signalingNorm, lowerLimitNorm));
// Assert
AssemblyCategoryAssert.AssertFailureMechanismSectionAssemblyCategories(output, result);
@@ -218,8 +218,8 @@
var calculator = new AssemblyCategoriesCalculator(factory);
// Call
- TestDelegate test = () => calculator.CalculateFailureMechanismSectionCategories(signalingNorm, lowerLimitNorm,
- failureMechanismContribution, n);
+ TestDelegate test = () => calculator.CalculateFailureMechanismSectionCategories(
+ new AssemblyCategoriesInput(n, failureMechanismContribution, signalingNorm, lowerLimitNorm));
// Assert
var exception = Assert.Throws(test);
@@ -233,10 +233,10 @@
{
// Setup
var random = new Random(11);
- double lowerLimitNorm = random.NextDouble(0.5, 1.0);
- double signalingNorm = random.NextDouble(0.0, 0.5);
- double failureMechanismContribution = random.NextDouble();
- double n = random.NextDouble(1, 5);
+ var assemblyCategoriesInput = new AssemblyCategoriesInput(random.NextDouble(1, 5),
+ random.NextDouble(),
+ random.NextDouble(0.0, 0.4),
+ random.NextDouble(0.5, 1.0));
using (new AssemblyToolKernelFactoryConfig())
{
@@ -247,13 +247,13 @@
var calculator = new AssemblyCategoriesCalculator(factory);
// Call
- calculator.CalculateGeotechnicFailureMechanismSectionCategories(signalingNorm, lowerLimitNorm, failureMechanismContribution, n);
+ calculator.CalculateGeotechnicFailureMechanismSectionCategories(assemblyCategoriesInput);
// Assert
- Assert.AreEqual(lowerLimitNorm, kernel.LowerLimitNorm);
- Assert.AreEqual(signalingNorm, kernel.SignalingNorm);
- Assert.AreEqual(failureMechanismContribution, kernel.FailureMechanismContribution);
- Assert.AreEqual(n, kernel.N);
+ Assert.AreEqual(assemblyCategoriesInput.LowerLimitNorm, kernel.LowerLimitNorm);
+ Assert.AreEqual(assemblyCategoriesInput.SignalingNorm, kernel.SignalingNorm);
+ Assert.AreEqual(assemblyCategoriesInput.FailureMechanismContribution, kernel.FailureMechanismContribution);
+ Assert.AreEqual(assemblyCategoriesInput.N, kernel.N);
}
}
@@ -278,7 +278,7 @@
// Call
IEnumerable result = calculator.CalculateGeotechnicFailureMechanismSectionCategories(
- signalingNorm, lowerLimitNorm, failureMechanismContribution, n);
+ new AssemblyCategoriesInput(n, failureMechanismContribution, signalingNorm, lowerLimitNorm));
// Assert
AssemblyCategoryAssert.AssertFailureMechanismSectionAssemblyCategories(output, result);
@@ -304,8 +304,8 @@
var calculator = new AssemblyCategoriesCalculator(factory);
// Call
- TestDelegate test = () => calculator.CalculateGeotechnicFailureMechanismSectionCategories(signalingNorm, lowerLimitNorm,
- failureMechanismContribution, n);
+ TestDelegate test = () => calculator.CalculateGeotechnicFailureMechanismSectionCategories(
+ new AssemblyCategoriesInput(n, failureMechanismContribution, signalingNorm, lowerLimitNorm));
// Assert
var exception = Assert.Throws(test);
Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Creators/AssemblyCategoryCreatorTest.cs
===================================================================
diff -u -r846d55260318cd847e6fca9ce9d9b3c057b96f2c -rbaf9e7a385fd374010f076868ddccc77b4da17ce
--- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Creators/AssemblyCategoryCreatorTest.cs (.../AssemblyCategoryCreatorTest.cs) (revision 846d55260318cd847e6fca9ce9d9b3c057b96f2c)
+++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Creators/AssemblyCategoryCreatorTest.cs (.../AssemblyCategoryCreatorTest.cs) (revision baf9e7a385fd374010f076868ddccc77b4da17ce)
@@ -45,7 +45,7 @@
// Assert
var exception = Assert.Throws(call);
- Assert.AreEqual("output", exception.ParamName);
+ Assert.AreEqual("categoryLimits", exception.ParamName);
}
[Test]
@@ -123,7 +123,7 @@
// Assert
var exception = Assert.Throws(call);
- Assert.AreEqual("output", exception.ParamName);
+ Assert.AreEqual("categoryLimits", exception.ParamName);
}
[Test]
Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Test/Calculators/Categories/AssemblyCategoriesCalculatorStubTest.cs
===================================================================
diff -u -ra4067e2144e8e953d200a613b0a20e52d5e05bce -rbaf9e7a385fd374010f076868ddccc77b4da17ce
--- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Test/Calculators/Categories/AssemblyCategoriesCalculatorStubTest.cs (.../AssemblyCategoriesCalculatorStubTest.cs) (revision a4067e2144e8e953d200a613b0a20e52d5e05bce)
+++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Test/Calculators/Categories/AssemblyCategoriesCalculatorStubTest.cs (.../AssemblyCategoriesCalculatorStubTest.cs) (revision baf9e7a385fd374010f076868ddccc77b4da17ce)
@@ -22,6 +22,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using Core.Common.TestUtil;
using NUnit.Framework;
using Ringtoets.AssemblyTool.Data;
using Ringtoets.AssemblyTool.KernelWrapper.Calculators.Categories;
@@ -138,7 +139,7 @@
var calculator = new AssemblyCategoriesCalculatorStub();
// Call
- FailureMechanismSectionAssemblyCategory[] result = calculator.CalculateFailureMechanismSectionCategories(0, 0, 0, 0).ToArray();
+ FailureMechanismSectionAssemblyCategory[] result = calculator.CalculateFailureMechanismSectionCategories(new AssemblyCategoriesInput(0, 0, 0, 0)).ToArray();
// Assert
Assert.AreEqual(3, result.Length);
@@ -167,21 +168,23 @@
{
// Setup
var random = new Random(39);
- double signalingNorm = random.NextDouble();
- double lowerLimitNorm = random.NextDouble();
- double failureMechanismContribution = random.NextDouble();
- double n = random.NextDouble();
+ var assemblyCategoriesInput = new AssemblyCategoriesInput(random.NextDouble(1, 5),
+ random.NextDouble(),
+ random.NextDouble(0.0, 0.4),
+ random.NextDouble(0.5, 1.0));
var calculator = new AssemblyCategoriesCalculatorStub();
// Call
- calculator.CalculateFailureMechanismSectionCategories(signalingNorm, lowerLimitNorm, failureMechanismContribution, n);
+ calculator.CalculateFailureMechanismSectionCategories(
+ assemblyCategoriesInput);
// Assert
- Assert.AreEqual(signalingNorm, calculator.SignalingNorm);
- Assert.AreEqual(lowerLimitNorm, calculator.LowerLimitNorm);
- Assert.AreEqual(failureMechanismContribution, calculator.FailureMechanismContribution);
- Assert.AreEqual(n, calculator.N);
+ AssemblyCategoriesInput actualAssemblyCategoriesInput = calculator.AssemblyCategoriesInput;
+ Assert.AreEqual(assemblyCategoriesInput.SignalingNorm, actualAssemblyCategoriesInput.SignalingNorm);
+ Assert.AreEqual(assemblyCategoriesInput.LowerLimitNorm, actualAssemblyCategoriesInput.LowerLimitNorm);
+ Assert.AreEqual(assemblyCategoriesInput.FailureMechanismContribution, actualAssemblyCategoriesInput.FailureMechanismContribution);
+ Assert.AreEqual(assemblyCategoriesInput.N, actualAssemblyCategoriesInput.N);
}
[Test]
@@ -194,7 +197,7 @@
};
// Call
- TestDelegate test = () => calculator.CalculateFailureMechanismSectionCategories(0, 0, 0, 0);
+ TestDelegate test = () => calculator.CalculateFailureMechanismSectionCategories(new AssemblyCategoriesInput(0, 0, 0, 0));
// Assert
var exception = Assert.Throws(test);
@@ -209,7 +212,8 @@
var calculator = new AssemblyCategoriesCalculatorStub();
// Call
- FailureMechanismSectionAssemblyCategory[] result = calculator.CalculateGeotechnicFailureMechanismSectionCategories(0, 0, 0, 0).ToArray();
+ FailureMechanismSectionAssemblyCategory[] result = calculator.CalculateGeotechnicFailureMechanismSectionCategories(
+ new AssemblyCategoriesInput(0, 0, 0, 0)).ToArray();
// Assert
Assert.AreEqual(3, result.Length);
@@ -238,21 +242,23 @@
{
// Setup
var random = new Random(39);
- double signalingNorm = random.NextDouble();
- double lowerLimitNorm = random.NextDouble();
- double failureMechanismContribution = random.NextDouble();
- double n = random.NextDouble();
+ var assemblyCategoriesInput = new AssemblyCategoriesInput(random.NextDouble(1, 5),
+ random.NextDouble(),
+ random.NextDouble(0.0, 0.4),
+ random.NextDouble(0.5, 1.0));
var calculator = new AssemblyCategoriesCalculatorStub();
// Call
- calculator.CalculateGeotechnicFailureMechanismSectionCategories(signalingNorm, lowerLimitNorm, failureMechanismContribution, n);
+ calculator.CalculateGeotechnicFailureMechanismSectionCategories(
+ assemblyCategoriesInput);
// Assert
- Assert.AreEqual(signalingNorm, calculator.SignalingNorm);
- Assert.AreEqual(lowerLimitNorm, calculator.LowerLimitNorm);
- Assert.AreEqual(failureMechanismContribution, calculator.FailureMechanismContribution);
- Assert.AreEqual(n, calculator.N);
+ AssemblyCategoriesInput actualAssemblyCategoriesInput = calculator.AssemblyCategoriesInput;
+ Assert.AreEqual(assemblyCategoriesInput.SignalingNorm, actualAssemblyCategoriesInput.SignalingNorm);
+ Assert.AreEqual(assemblyCategoriesInput.LowerLimitNorm, actualAssemblyCategoriesInput.LowerLimitNorm);
+ Assert.AreEqual(assemblyCategoriesInput.FailureMechanismContribution, actualAssemblyCategoriesInput.FailureMechanismContribution);
+ Assert.AreEqual(assemblyCategoriesInput.N, actualAssemblyCategoriesInput.N);
}
[Test]
@@ -265,7 +271,7 @@
};
// Call
- TestDelegate test = () => calculator.CalculateGeotechnicFailureMechanismSectionCategories(0, 0, 0, 0);
+ TestDelegate test = () => calculator.CalculateGeotechnicFailureMechanismSectionCategories(new AssemblyCategoriesInput(0, 0, 0, 0));
// Assert
var exception = Assert.Throws(test);
Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/Calculators/Categories/AssemblyCategoriesCalculatorStub.cs
===================================================================
diff -u -ra4067e2144e8e953d200a613b0a20e52d5e05bce -rbaf9e7a385fd374010f076868ddccc77b4da17ce
--- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/Calculators/Categories/AssemblyCategoriesCalculatorStub.cs (.../AssemblyCategoriesCalculatorStub.cs) (revision a4067e2144e8e953d200a613b0a20e52d5e05bce)
+++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.TestUtil/Calculators/Categories/AssemblyCategoriesCalculatorStub.cs (.../AssemblyCategoriesCalculatorStub.cs) (revision baf9e7a385fd374010f076868ddccc77b4da17ce)
@@ -42,16 +42,11 @@
public double LowerLimitNorm { get; private set; }
///
- /// Gets the failure mechanism contribution that is used in the calculation.
+ /// Gets the assembly categories input used in the assembly calculation methods.
///
- public double FailureMechanismContribution { get; private set; }
+ public AssemblyCategoriesInput AssemblyCategoriesInput { get; private set; }
///
- /// Gets the n that is used in the calculation.
- ///
- public double N { get; private set; }
-
- ///
/// Gets or sets the output of the calculation.
///
public IEnumerable AssessmentSectionCategoriesOutput { get; set; }
@@ -85,18 +80,15 @@
});
}
- public IEnumerable CalculateFailureMechanismSectionCategories(double signalingNorm, double lowerLimitNorm,
- double failureMechanismContribution, double n)
+ public IEnumerable CalculateFailureMechanismSectionCategories(
+ AssemblyCategoriesInput assemblyCategoriesInput)
{
if (ThrowExceptionOnCalculate)
{
throw new AssemblyCategoriesCalculatorException("Message", new Exception());
}
- SignalingNorm = signalingNorm;
- LowerLimitNorm = lowerLimitNorm;
- FailureMechanismContribution = failureMechanismContribution;
- N = n;
+ AssemblyCategoriesInput = assemblyCategoriesInput;
return FailureMechanismSectionCategoriesOutput
?? (FailureMechanismSectionCategoriesOutput = new[]
@@ -107,18 +99,15 @@
});
}
- public IEnumerable CalculateGeotechnicFailureMechanismSectionCategories(double signalingNorm, double lowerLimitNorm,
- double failureMechanismContribution, double n)
+ public IEnumerable CalculateGeotechnicFailureMechanismSectionCategories(
+ AssemblyCategoriesInput assemblyCategoriesInput)
{
if (ThrowExceptionOnCalculate)
{
throw new AssemblyCategoriesCalculatorException("Message", new Exception());
}
- SignalingNorm = signalingNorm;
- LowerLimitNorm = lowerLimitNorm;
- FailureMechanismContribution = failureMechanismContribution;
- N = n;
+ AssemblyCategoriesInput = assemblyCategoriesInput;
return FailureMechanismSectionCategoriesOutput
?? (FailureMechanismSectionCategoriesOutput = new[]
Index: Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/AssemblyToolCategoriesFactory.cs
===================================================================
diff -u -rb29487c198d87b176783f2396c2b59cd76b9f246 -rbaf9e7a385fd374010f076868ddccc77b4da17ce
--- Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/AssemblyToolCategoriesFactory.cs (.../AssemblyToolCategoriesFactory.cs) (revision b29487c198d87b176783f2396c2b59cd76b9f246)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/AssemblyToolCategoriesFactory.cs (.../AssemblyToolCategoriesFactory.cs) (revision baf9e7a385fd374010f076868ddccc77b4da17ce)
@@ -76,10 +76,10 @@
try
{
- return calculator.CalculateFailureMechanismSectionCategories(signalingNorm,
- lowerLimitNorm,
- failureMechanismContribution / 100,
- n);
+ return calculator.CalculateFailureMechanismSectionCategories(new AssemblyCategoriesInput(n,
+ failureMechanismContribution,
+ signalingNorm,
+ lowerLimitNorm));
}
catch (AssemblyCategoriesCalculatorException e)
{
@@ -108,10 +108,10 @@
try
{
- return calculator.CalculateGeotechnicFailureMechanismSectionCategories(signalingNorm,
- lowerLimitNorm,
- failureMechanismContribution / 100,
- n);
+ return calculator.CalculateGeotechnicFailureMechanismSectionCategories(new AssemblyCategoriesInput(n,
+ failureMechanismContribution,
+ signalingNorm,
+ lowerLimitNorm));
}
catch (AssemblyCategoriesCalculatorException e)
{
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/AssemblyToolCategoriesFactoryTest.cs
===================================================================
diff -u -rb29487c198d87b176783f2396c2b59cd76b9f246 -rbaf9e7a385fd374010f076868ddccc77b4da17ce
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/AssemblyToolCategoriesFactoryTest.cs (.../AssemblyToolCategoriesFactoryTest.cs) (revision b29487c198d87b176783f2396c2b59cd76b9f246)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/AssemblyToolCategoriesFactoryTest.cs (.../AssemblyToolCategoriesFactoryTest.cs) (revision baf9e7a385fd374010f076868ddccc77b4da17ce)
@@ -125,10 +125,11 @@
n);
// Assert
- Assert.AreEqual(signalingNorm, calculator.SignalingNorm);
- Assert.AreEqual(lowerLimitNorm, calculator.LowerLimitNorm);
- Assert.AreEqual(failureMechanismContribution / 100, calculator.FailureMechanismContribution);
- Assert.AreEqual(n, calculator.N);
+ AssemblyCategoriesInput assemblyCategoriesInput = calculator.AssemblyCategoriesInput;
+ Assert.AreEqual(signalingNorm, assemblyCategoriesInput.SignalingNorm);
+ Assert.AreEqual(lowerLimitNorm, assemblyCategoriesInput.LowerLimitNorm);
+ Assert.AreEqual(failureMechanismContribution / 100, assemblyCategoriesInput.FailureMechanismContribution);
+ Assert.AreEqual(n, assemblyCategoriesInput.N);
}
}
@@ -206,10 +207,11 @@
n);
// Assert
- Assert.AreEqual(signalingNorm, calculator.SignalingNorm);
- Assert.AreEqual(lowerLimitNorm, calculator.LowerLimitNorm);
- Assert.AreEqual(failureMechanismContribution / 100, calculator.FailureMechanismContribution);
- Assert.AreEqual(n, calculator.N);
+ AssemblyCategoriesInput assemblyCategoriesInput = calculator.AssemblyCategoriesInput;
+ Assert.AreEqual(signalingNorm, assemblyCategoriesInput.SignalingNorm);
+ Assert.AreEqual(lowerLimitNorm, assemblyCategoriesInput.LowerLimitNorm);
+ Assert.AreEqual(failureMechanismContribution / 100, assemblyCategoriesInput.FailureMechanismContribution);
+ Assert.AreEqual(n, assemblyCategoriesInput.N);
}
}