Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/Ringtoets.ClosingStructures.Plugin.Test.csproj
===================================================================
diff -u -r8b8e62bfddfca997d2ed5df4a0c9c72648f1b5b4 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/Ringtoets.ClosingStructures.Plugin.Test.csproj (.../Ringtoets.ClosingStructures.Plugin.Test.csproj) (revision 8b8e62bfddfca997d2ed5df4a0c9c72648f1b5b4)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/Ringtoets.ClosingStructures.Plugin.Test.csproj (.../Ringtoets.ClosingStructures.Plugin.Test.csproj) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -89,6 +89,18 @@
{4a06df0d-5d75-4bad-a95a-a3db9b7c4ad5}
Core.Components.Gis.Forms
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
+
+ {358B6DA2-A1DF-477F-B6AC-C30204265CB0}
+ Ringtoets.AssemblyTool.KernelWrapper
+
+
+ {0AB432BB-E2CC-42EA-A72C-7AFEF7536B38}
+ Ringtoets.AssemblyTool.KernelWrapper.TestUtil
+
{D4200F43-3F72-4F42-AF0A-8CED416A38EC}
Ringtoets.Common.Data
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresFailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -rb050816435baf537ed7e77072c3db76cfac8aeca -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../ClosingStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision b050816435baf537ed7e77072c3db76cfac8aeca)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../ClosingStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -34,6 +34,9 @@
using NUnit.Extensions.Forms;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
using Ringtoets.ClosingStructures.Data;
using Ringtoets.ClosingStructures.Data.TestUtil;
using Ringtoets.ClosingStructures.Forms.PresentationObjects;
@@ -98,8 +101,7 @@
public void ChildNodeObjects_FailureMechanismIsRelevant_ReturnChildDataNodes()
{
// Setup
- var assessmentSection = mocksRepository.Stub();
- mocksRepository.ReplayAll();
+ var assessmentSection = new AssessmentSectionStub();
var failureMechanism = new ClosingStructuresFailureMechanism();
var failureMechanismContext = new ClosingStructuresFailureMechanismContext(failureMechanism, assessmentSection);
@@ -146,8 +148,16 @@
var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputsFolder.Contents.ElementAt(0);
Assert.AreSame(failureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData);
Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection);
- Assert.AreEqual(failureMechanism.GeneralInput.N, failureMechanismAssemblyCategoriesContext.GetNFunc());
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ Assert.AreEqual(failureMechanism.GeneralInput.N, calculator.AssemblyCategoriesInput.N);
+ }
+
var scenariosContext = (ClosingStructuresScenariosContext) outputsFolder.Contents.ElementAt(1);
Assert.AreSame(failureMechanism.CalculationsGroup, scenariosContext.WrappedData);
Assert.AreSame(failureMechanism, scenariosContext.ParentFailureMechanism);
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismAssemblyCategoriesContext.cs
===================================================================
diff -u -r3a1e1ede91f3bf55c491522285ff35c20b5dcf0f -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismAssemblyCategoriesContext.cs (.../FailureMechanismAssemblyCategoriesContext.cs) (revision 3a1e1ede91f3bf55c491522285ff35c20b5dcf0f)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismAssemblyCategoriesContext.cs (.../FailureMechanismAssemblyCategoriesContext.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -45,8 +45,6 @@
Func getNFunc)
: base(wrappedData, assessmentSection, getNFunc)
{
- GetNFunc = getNFunc;
-
GetFailureMechanismSectionAssemblyCategoriesFunc = () =>
AssemblyToolCategoriesFactory.CreateFailureMechanismSectionAssemblyCategories(FailureMechanismContribution.SignalingNorm,
FailureMechanismContribution.LowerLimitNorm,
@@ -55,10 +53,5 @@
}
public override Func> GetFailureMechanismSectionAssemblyCategoriesFunc { get; }
-
- ///
- /// Gets the function to get the 'N' parameter used to factor in the 'length effect'.
- ///
- public Func GetNFunc { get; }
}
}
\ No newline at end of file
Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/Ringtoets.DuneErosion.Plugin.Test.csproj
===================================================================
diff -u -rda9b4d448357657501746aa975ccbba8fef7c1aa -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/Ringtoets.DuneErosion.Plugin.Test.csproj (.../Ringtoets.DuneErosion.Plugin.Test.csproj) (revision da9b4d448357657501746aa975ccbba8fef7c1aa)
+++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/Ringtoets.DuneErosion.Plugin.Test.csproj (.../Ringtoets.DuneErosion.Plugin.Test.csproj) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -76,6 +76,18 @@
{4a06df0d-5d75-4bad-a95a-a3db9b7c4ad5}
Core.Components.Gis.Forms
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
+
+ {358B6DA2-A1DF-477F-B6AC-C30204265CB0}
+ Ringtoets.AssemblyTool.KernelWrapper
+
+
+ {0AB432BB-E2CC-42EA-A72C-7AFEF7536B38}
+ Ringtoets.AssemblyTool.KernelWrapper.TestUtil
+
{d4200f43-3f72-4f42-af0a-8ced416a38ec}
Ringtoets.Common.Data
Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneErosionFailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -r90f9c5637e4bbbe4204f45fdc549b416ba4f3453 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneErosionFailureMechanismContextTreeNodeInfoTest.cs (.../DuneErosionFailureMechanismContextTreeNodeInfoTest.cs) (revision 90f9c5637e4bbbe4204f45fdc549b416ba4f3453)
+++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneErosionFailureMechanismContextTreeNodeInfoTest.cs (.../DuneErosionFailureMechanismContextTreeNodeInfoTest.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -29,8 +29,12 @@
using Core.Common.TestUtil;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.TestUtil;
using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.DuneErosion.Data;
using Ringtoets.DuneErosion.Forms.PresentationObjects;
@@ -95,8 +99,7 @@
public void ChildNodeObjects_FailureMechanismIsRelevant_ReturnChildDataNodes()
{
// Setup
- var assessmentSection = mocksRepository.Stub();
- mocksRepository.ReplayAll();
+ var assessmentSection = new AssessmentSectionStub();
var failureMechanism = new DuneErosionFailureMechanism();
var failureMechanismContext = new DuneErosionFailureMechanismContext(failureMechanism, assessmentSection);
@@ -130,11 +133,19 @@
Assert.AreEqual(3, outputsFolder.Contents.Count());
- var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext)outputsFolder.Contents.ElementAt(0);
+ var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputsFolder.Contents.ElementAt(0);
Assert.AreSame(failureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData);
Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection);
- Assert.AreEqual(failureMechanism.GeneralInput.N, failureMechanismAssemblyCategoriesContext.GetNFunc());
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ Assert.AreEqual(failureMechanism.GeneralInput.N, calculator.AssemblyCategoriesInput.N);
+ }
+
var failureMechanismResultsContext = (FailureMechanismSectionResultContext) outputsFolder.Contents.ElementAt(1);
Assert.AreSame(failureMechanism, failureMechanismResultsContext.FailureMechanism);
Assert.AreSame(failureMechanism.SectionResults, failureMechanismResultsContext.WrappedData);
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/Ringtoets.GrassCoverErosionInwards.Plugin.Test.csproj
===================================================================
diff -u -r8b8e62bfddfca997d2ed5df4a0c9c72648f1b5b4 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/Ringtoets.GrassCoverErosionInwards.Plugin.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Plugin.Test.csproj) (revision 8b8e62bfddfca997d2ed5df4a0c9c72648f1b5b4)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/Ringtoets.GrassCoverErosionInwards.Plugin.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Plugin.Test.csproj) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -105,6 +105,18 @@
{4a06df0d-5d75-4bad-a95a-a3db9b7c4ad5}
Core.Components.Gis.Forms
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
+
+ {358B6DA2-A1DF-477F-B6AC-C30204265CB0}
+ Ringtoets.AssemblyTool.KernelWrapper
+
+
+ {0AB432BB-E2CC-42EA-A72C-7AFEF7536B38}
+ Ringtoets.AssemblyTool.KernelWrapper.TestUtil
+
{d4200f43-3f72-4f42-af0a-8ced416a38ec}
Ringtoets.Common.Data
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -r3e8b168f8ffcbd8eac8e8c4a58731d68b82c071f -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision 3e8b168f8ffcbd8eac8e8c4a58731d68b82c071f)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -33,6 +33,9 @@
using NUnit.Extensions.Forms;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Hydraulics;
@@ -63,21 +66,6 @@
private GrassCoverErosionInwardsPlugin plugin;
private TreeNodeInfo info;
- public override void Setup()
- {
- mocksRepository = new MockRepository();
- plugin = new GrassCoverErosionInwardsPlugin();
- info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(GrassCoverErosionInwardsFailureMechanismContext));
- }
-
- public override void TearDown()
- {
- plugin.Dispose();
- mocksRepository.VerifyAll();
-
- base.TearDown();
- }
-
[Test]
public void Initialized_Always_ExpectedPropertiesSet()
{
@@ -109,8 +97,7 @@
public void ChildNodeObjects_FailureMechanismIsRelevant_ReturnChildDataNodes()
{
// Setup
- var assessmentSection = mocksRepository.Stub();
- mocksRepository.ReplayAll();
+ var assessmentSection = new AssessmentSectionStub();
var failureMechanism = new GrassCoverErosionInwardsFailureMechanism();
var failureMechanismContext = new GrassCoverErosionInwardsFailureMechanismContext(failureMechanism, assessmentSection);
@@ -148,11 +135,19 @@
Assert.AreEqual(TreeFolderCategory.Output, outputsFolder.Category);
Assert.AreEqual(4, outputsFolder.Contents.Count());
- var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext)outputsFolder.Contents.ElementAt(0);
+ var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputsFolder.Contents.ElementAt(0);
Assert.AreSame(failureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData);
Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection);
- Assert.AreEqual(failureMechanism.GeneralInput.N, failureMechanismAssemblyCategoriesContext.GetNFunc());
-
+
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ Assert.AreEqual(failureMechanism.GeneralInput.N, calculator.AssemblyCategoriesInput.N);
+ }
+
var scenariosContext = (GrassCoverErosionInwardsScenariosContext) outputsFolder.Contents.ElementAt(1);
Assert.AreSame(failureMechanism.CalculationsGroup, scenariosContext.WrappedData);
Assert.AreSame(failureMechanism, scenariosContext.ParentFailureMechanism);
@@ -225,6 +220,7 @@
// Call
info.ContextMenuStrip(failureMechanismContext, null, treeViewControl);
}
+
// Assert
// Assert expectancies are called in TearDown()
}
@@ -261,6 +257,7 @@
// Call
info.ContextMenuStrip(failureMechanismContext, null, treeViewControl);
}
+
// Assert
// Assert expectancies are called in TearDown()
}
@@ -861,5 +858,20 @@
}
}
}
+
+ public override void Setup()
+ {
+ mocksRepository = new MockRepository();
+ plugin = new GrassCoverErosionInwardsPlugin();
+ info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(GrassCoverErosionInwardsFailureMechanismContext));
+ }
+
+ public override void TearDown()
+ {
+ plugin.Dispose();
+ mocksRepository.VerifyAll();
+
+ base.TearDown();
+ }
}
}
\ No newline at end of file
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj
===================================================================
diff -u -rf1d92a5cb2eebdf9f6c093b9ae66bb7ff95b6e41 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj) (revision f1d92a5cb2eebdf9f6c093b9ae66bb7ff95b6e41)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -105,6 +105,18 @@
{4a06df0d-5d75-4bad-a95a-a3db9b7c4ad5}
Core.Components.Gis.Forms
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
+
+ {358B6DA2-A1DF-477F-B6AC-C30204265CB0}
+ Ringtoets.AssemblyTool.KernelWrapper
+
+
+ {0AB432BB-E2CC-42EA-A72C-7AFEF7536B38}
+ Ringtoets.AssemblyTool.KernelWrapper.TestUtil
+
{D4200F43-3F72-4F42-AF0A-8CED416A38EC}
Ringtoets.Common.Data
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsFailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -re5017142a4aa94d60660fa20450f34eeb26662ab -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsFailureMechanismContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision e5017142a4aa94d60660fa20450f34eeb26662ab)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsFailureMechanismContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -31,6 +31,9 @@
using Core.Common.TestUtil;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.TestUtil;
@@ -214,11 +217,19 @@
Assert.AreEqual(TreeFolderCategory.Output, outputsFolder.Category);
Assert.AreEqual(3, outputsFolder.Contents.Count());
- var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext)outputsFolder.Contents.ElementAt(0);
+ var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputsFolder.Contents.ElementAt(0);
Assert.AreSame(failureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData);
Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection);
- Assert.AreEqual(failureMechanism.GeneralInput.N, failureMechanismAssemblyCategoriesContext.GetNFunc());
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ Assert.AreEqual(failureMechanism.GeneralInput.N, calculator.AssemblyCategoriesInput.N);
+ }
+
var failureMechanismResultsContext = (FailureMechanismSectionResultContext)
outputsFolder.Contents.ElementAt(1);
Assert.AreSame(failureMechanism, failureMechanismResultsContext.FailureMechanism);
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/Ringtoets.HeightStructures.Plugin.Test.csproj
===================================================================
diff -u -r8b8e62bfddfca997d2ed5df4a0c9c72648f1b5b4 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/Ringtoets.HeightStructures.Plugin.Test.csproj (.../Ringtoets.HeightStructures.Plugin.Test.csproj) (revision 8b8e62bfddfca997d2ed5df4a0c9c72648f1b5b4)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/Ringtoets.HeightStructures.Plugin.Test.csproj (.../Ringtoets.HeightStructures.Plugin.Test.csproj) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -89,6 +89,18 @@
{4a06df0d-5d75-4bad-a95a-a3db9b7c4ad5}
Core.Components.Gis.Forms
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
+
+ {358B6DA2-A1DF-477F-B6AC-C30204265CB0}
+ Ringtoets.AssemblyTool.KernelWrapper
+
+
+ {0AB432BB-E2CC-42EA-A72C-7AFEF7536B38}
+ Ringtoets.AssemblyTool.KernelWrapper.TestUtil
+
{d4200f43-3f72-4f42-af0a-8ced416a38ec}
Ringtoets.Common.Data
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -r396e74911bf83a7fe62c223b197ed0572889fd6d -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 396e74911bf83a7fe62c223b197ed0572889fd6d)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -34,6 +34,9 @@
using NUnit.Extensions.Forms;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Hydraulics;
@@ -113,8 +116,7 @@
public void ChildNodeObjects_FailureMechanismIsRelevant_ReturnChildDataNodes()
{
// Setup
- var assessmentSection = mocksRepository.Stub();
- mocksRepository.ReplayAll();
+ var assessmentSection = new AssessmentSectionStub();
var failureMechanism = new HeightStructuresFailureMechanism();
var failureMechanismContext = new HeightStructuresFailureMechanismContext(failureMechanism, assessmentSection);
@@ -160,8 +162,16 @@
var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputsFolder.Contents.ElementAt(0);
Assert.AreSame(failureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData);
Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection);
- Assert.AreEqual(failureMechanism.GeneralInput.N, failureMechanismAssemblyCategoriesContext.GetNFunc());
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ Assert.AreEqual(failureMechanism.GeneralInput.N, calculator.AssemblyCategoriesInput.N);
+ }
+
var scenariosContext = (HeightStructuresScenariosContext) outputsFolder.Contents.ElementAt(1);
Assert.AreSame(failureMechanism, scenariosContext.ParentFailureMechanism);
Assert.AreSame(failureMechanism.CalculationsGroup, scenariosContext.WrappedData);
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/PipingStructureFailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -r36b251c4f00aaf9335df69040fe592336ff01928 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/PipingStructureFailureMechanismContextTreeNodeInfoTest.cs (.../PipingStructureFailureMechanismContextTreeNodeInfoTest.cs) (revision 36b251c4f00aaf9335df69040fe592336ff01928)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/PipingStructureFailureMechanismContextTreeNodeInfoTest.cs (.../PipingStructureFailureMechanismContextTreeNodeInfoTest.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -32,11 +32,17 @@
using Core.Common.TestUtil;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.FailureMechanism;
+using Ringtoets.Common.Data.Probability;
+using Ringtoets.Common.Data.TestUtil;
using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.Integration.Data.StandAlone;
+using Ringtoets.Integration.Data.StandAlone.Input;
using Ringtoets.Integration.Data.StandAlone.SectionResults;
using Ringtoets.Integration.Forms.PresentationObjects.StandAlone;
using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
@@ -145,8 +151,7 @@
public void ChildNodeObjects_FailureMechanismIsRelevant_ReturnChildDataNodes()
{
// Setup
- var assessmentSection = mocks.Stub();
- mocks.ReplayAll();
+ var assessmentSection = new AssessmentSectionStub();
var failureMechanism = new PipingStructureFailureMechanism();
@@ -171,11 +176,20 @@
var outputFolder = (CategoryTreeFolder) children[1];
Assert.AreEqual("Oordeel", outputFolder.Name);
Assert.AreEqual(TreeFolderCategory.Output, outputFolder.Category);
+
var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputFolder.Contents.ElementAt(0);
Assert.AreSame(failureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData);
Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection);
- Assert.AreEqual(failureMechanism.N, failureMechanismAssemblyCategoriesContext.GetNFunc());
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactory)AssemblyToolCalculatorFactory.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ Assert.AreEqual(failureMechanism.N, calculator.AssemblyCategoriesInput.N);
+ }
+
var failureMechanismResultsContext = (FailureMechanismSectionResultContext)
outputFolder.Contents.ElementAt(1);
Assert.AreSame(failureMechanism, failureMechanismResultsContext.FailureMechanism);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/Ringtoets.MacroStabilityInwards.Plugin.Test.csproj
===================================================================
diff -u -r418185116fc7b5f87faae358aabb6dd3926fa983 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/Ringtoets.MacroStabilityInwards.Plugin.Test.csproj (.../Ringtoets.MacroStabilityInwards.Plugin.Test.csproj) (revision 418185116fc7b5f87faae358aabb6dd3926fa983)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/Ringtoets.MacroStabilityInwards.Plugin.Test.csproj (.../Ringtoets.MacroStabilityInwards.Plugin.Test.csproj) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -112,6 +112,18 @@
{4a06df0d-5d75-4bad-a95a-a3db9b7c4ad5}
Core.Components.Gis.Forms
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
+
+ {358B6DA2-A1DF-477F-B6AC-C30204265CB0}
+ Ringtoets.AssemblyTool.KernelWrapper
+
+
+ {0AB432BB-E2CC-42EA-A72C-7AFEF7536B38}
+ Ringtoets.AssemblyTool.KernelWrapper.TestUtil
+
{d4200f43-3f72-4f42-af0a-8ced416a38ec}
Ringtoets.Common.Data
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsFailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -r6d65336d7df9a1e1a48bc27e6ec3877be8a94714 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision 6d65336d7df9a1e1a48bc27e6ec3877be8a94714)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../MacroStabilityInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -34,6 +34,9 @@
using NUnit.Extensions.Forms;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Calculation;
@@ -125,8 +128,7 @@
public void ChildNodeObjects_FailureMechanismIsRelevant_ReturnChildDataNodes()
{
// Setup
- var assessmentSection = mocks.Stub();
- mocks.ReplayAll();
+ var assessmentSection = new AssessmentSectionStub();
var failureMechanism = new MacroStabilityInwardsFailureMechanism();
failureMechanism.CalculationsGroup.Children.Add(new MacroStabilityInwardsCalculationScenario());
@@ -173,12 +175,20 @@
Assert.AreEqual(TreeFolderCategory.Output, outputsFolder.Category);
Assert.AreEqual(4, outputsFolder.Contents.Count());
- var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext)outputsFolder.Contents.ElementAt(0);
+ var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputsFolder.Contents.ElementAt(0);
Assert.AreSame(failureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData);
Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection);
- MacroStabilityInwardsProbabilityAssessmentInput probabilityAssessmentInput = failureMechanism.MacroStabilityInwardsProbabilityAssessmentInput;
- Assert.AreEqual(probabilityAssessmentInput.GetN(probabilityAssessmentInput.SectionLength), failureMechanismAssemblyCategoriesContext.GetNFunc());
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ MacroStabilityInwardsProbabilityAssessmentInput probabilityAssessmentInput = failureMechanism.MacroStabilityInwardsProbabilityAssessmentInput;
+ Assert.AreEqual(probabilityAssessmentInput.GetN(probabilityAssessmentInput.SectionLength), calculator.AssemblyCategoriesInput.N);
+ }
+
var failureMechanismScenariosContext = (MacroStabilityInwardsScenariosContext) outputsFolder.Contents.ElementAt(1);
Assert.AreSame(failureMechanism, failureMechanismScenariosContext.FailureMechanism);
Assert.AreSame(failureMechanism.CalculationsGroup, failureMechanismScenariosContext.WrappedData);
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/Ringtoets.Piping.Plugin.Test.csproj
===================================================================
diff -u -r4abbfc484024001a04add8b2634777acb246cd83 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/Ringtoets.Piping.Plugin.Test.csproj (.../Ringtoets.Piping.Plugin.Test.csproj) (revision 4abbfc484024001a04add8b2634777acb246cd83)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/Ringtoets.Piping.Plugin.Test.csproj (.../Ringtoets.Piping.Plugin.Test.csproj) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -112,6 +112,18 @@
{4a06df0d-5d75-4bad-a95a-a3db9b7c4ad5}
Core.Components.Gis.Forms
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
+
+ {358B6DA2-A1DF-477F-B6AC-C30204265CB0}
+ Ringtoets.AssemblyTool.KernelWrapper
+
+
+ {0AB432BB-E2CC-42EA-A72C-7AFEF7536B38}
+ Ringtoets.AssemblyTool.KernelWrapper.TestUtil
+
{d4200f43-3f72-4f42-af0a-8ced416a38ec}
Ringtoets.Common.Data
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/PipingFailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -r9dbf6c9caffc712450adb0ee180f0e40e93c380a -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/PipingFailureMechanismContextTreeNodeInfoTest.cs (.../PipingFailureMechanismContextTreeNodeInfoTest.cs) (revision 9dbf6c9caffc712450adb0ee180f0e40e93c380a)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/PipingFailureMechanismContextTreeNodeInfoTest.cs (.../PipingFailureMechanismContextTreeNodeInfoTest.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -34,6 +34,9 @@
using NUnit.Extensions.Forms;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Calculation;
@@ -124,8 +127,7 @@
public void ChildNodeObjects_FailureMechanismIsRelevant_ReturnChildDataNodes()
{
// Setup
- var assessmentSection = mocks.Stub();
- mocks.ReplayAll();
+ var assessmentSection = new AssessmentSectionStub();
var generalInputParameters = new GeneralPipingInput();
var pipingFailureMechanism = new PipingFailureMechanism();
@@ -176,9 +178,17 @@
var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputsFolder.Contents.ElementAt(0);
Assert.AreSame(pipingFailureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData);
Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection);
- PipingProbabilityAssessmentInput probabilityAssessmentInput = pipingFailureMechanism.PipingProbabilityAssessmentInput;
- Assert.AreEqual(probabilityAssessmentInput.GetN(probabilityAssessmentInput.SectionLength), failureMechanismAssemblyCategoriesContext.GetNFunc());
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ PipingProbabilityAssessmentInput probabilityAssessmentInput = pipingFailureMechanism.PipingProbabilityAssessmentInput;
+ Assert.AreEqual(probabilityAssessmentInput.GetN(probabilityAssessmentInput.SectionLength), calculator.AssemblyCategoriesInput.N);
+ }
+
var failureMechanismScenariosContext = (PipingScenariosContext) outputsFolder.Contents.ElementAt(1);
Assert.AreSame(pipingFailureMechanism, failureMechanismScenariosContext.FailureMechanism);
Assert.AreSame(pipingFailureMechanism.CalculationsGroup, failureMechanismScenariosContext.WrappedData);
Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/Ringtoets.StabilityPointStructures.Plugin.Test.csproj
===================================================================
diff -u -r8b8e62bfddfca997d2ed5df4a0c9c72648f1b5b4 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/Ringtoets.StabilityPointStructures.Plugin.Test.csproj (.../Ringtoets.StabilityPointStructures.Plugin.Test.csproj) (revision 8b8e62bfddfca997d2ed5df4a0c9c72648f1b5b4)
+++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/Ringtoets.StabilityPointStructures.Plugin.Test.csproj (.../Ringtoets.StabilityPointStructures.Plugin.Test.csproj) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -89,6 +89,18 @@
{4a06df0d-5d75-4bad-a95a-a3db9b7c4ad5}
Core.Components.Gis.Forms
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
+
+ {358B6DA2-A1DF-477F-B6AC-C30204265CB0}
+ Ringtoets.AssemblyTool.KernelWrapper
+
+
+ {0AB432BB-E2CC-42EA-A72C-7AFEF7536B38}
+ Ringtoets.AssemblyTool.KernelWrapper.TestUtil
+
{D4200F43-3F72-4F42-AF0A-8CED416A38EC}
Ringtoets.Common.Data
Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -r0e645d07cd493257789f930569875d65652c3ffe -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 0e645d07cd493257789f930569875d65652c3ffe)
+++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -34,6 +34,9 @@
using NUnit.Extensions.Forms;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Hydraulics;
@@ -99,8 +102,7 @@
public void ChildNodeObjects_FailureMechanismIsRelevant_ReturnChildDataNodes()
{
// Setup
- var assessmentSection = mocksRepository.Stub();
- mocksRepository.ReplayAll();
+ var assessmentSection = new AssessmentSectionStub();
var failureMechanism = new StabilityPointStructuresFailureMechanism();
var failureMechanismContext = new StabilityPointStructuresFailureMechanismContext(failureMechanism, assessmentSection);
@@ -150,8 +152,16 @@
var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputsFolder.Contents.ElementAt(0);
Assert.AreSame(failureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData);
Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection);
- Assert.AreEqual(failureMechanism.GeneralInput.N, failureMechanismAssemblyCategoriesContext.GetNFunc());
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ Assert.AreEqual(failureMechanism.GeneralInput.N, calculator.AssemblyCategoriesInput.N);
+ }
+
var scenariosContext = (StabilityPointStructuresScenariosContext) outputsFolder.Contents.ElementAt(1);
Assert.AreSame(failureMechanism, scenariosContext.ParentFailureMechanism);
Assert.AreSame(failureMechanism.CalculationsGroup, scenariosContext.WrappedData);
Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/Ringtoets.StabilityStoneCover.Plugin.Test.csproj
===================================================================
diff -u -r12eb4df5de341fb318093517a33d805caef22b1a -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/Ringtoets.StabilityStoneCover.Plugin.Test.csproj (.../Ringtoets.StabilityStoneCover.Plugin.Test.csproj) (revision 12eb4df5de341fb318093517a33d805caef22b1a)
+++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/Ringtoets.StabilityStoneCover.Plugin.Test.csproj (.../Ringtoets.StabilityStoneCover.Plugin.Test.csproj) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -92,6 +92,18 @@
{4a06df0d-5d75-4bad-a95a-a3db9b7c4ad5}
Core.Components.Gis.Forms
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
+
+ {358B6DA2-A1DF-477F-B6AC-C30204265CB0}
+ Ringtoets.AssemblyTool.KernelWrapper
+
+
+ {0AB432BB-E2CC-42EA-A72C-7AFEF7536B38}
+ Ringtoets.AssemblyTool.KernelWrapper.TestUtil
+
{d4200f43-3f72-4f42-af0a-8ced416a38ec}
Ringtoets.Common.Data
Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/TreeNodeInfos/StabilityStoneCoverFailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -raf602e7e326d4bee24e0c3cd5484f16aaf78eaae -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/TreeNodeInfos/StabilityStoneCoverFailureMechanismContextTreeNodeInfoTest.cs (.../StabilityStoneCoverFailureMechanismContextTreeNodeInfoTest.cs) (revision af602e7e326d4bee24e0c3cd5484f16aaf78eaae)
+++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/TreeNodeInfos/StabilityStoneCoverFailureMechanismContextTreeNodeInfoTest.cs (.../StabilityStoneCoverFailureMechanismContextTreeNodeInfoTest.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -31,8 +31,12 @@
using Core.Common.TestUtil;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.TestUtil;
using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.StabilityStoneCover.Data;
using Ringtoets.StabilityStoneCover.Forms.PresentationObjects;
@@ -173,8 +177,7 @@
public void ChildNodeObjects_FailureMechanismIsRelevant_ReturnChildDataNodes()
{
// Setup
- var assessmentSection = mocks.Stub();
- mocks.ReplayAll();
+ var assessmentSection = new AssessmentSectionStub();
var failureMechanism = new StabilityStoneCoverFailureMechanism
{
@@ -216,11 +219,19 @@
Assert.AreEqual(TreeFolderCategory.Output, outputsFolder.Category);
Assert.AreEqual(3, outputsFolder.Contents.Count());
- var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext)outputsFolder.Contents.ElementAt(0);
+ var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputsFolder.Contents.ElementAt(0);
Assert.AreSame(failureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData);
Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection);
- Assert.AreEqual(failureMechanism.GeneralInput.N, failureMechanismAssemblyCategoriesContext.GetNFunc());
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ Assert.AreEqual(failureMechanism.GeneralInput.N, calculator.AssemblyCategoriesInput.N);
+ }
+
var failureMechanismResultsContext = (FailureMechanismSectionResultContext) outputsFolder.Contents.ElementAt(1);
Assert.AreSame(failureMechanism, failureMechanismResultsContext.FailureMechanism);
Assert.AreSame(failureMechanism.SectionResults, failureMechanismResultsContext.WrappedData);
Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test.csproj
===================================================================
diff -u -r86c456355aa32d442be661be2a6de1a2d2ae63e0 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test.csproj (.../Ringtoets.WaveImpactAsphaltCover.Plugin.Test.csproj) (revision 86c456355aa32d442be661be2a6de1a2d2ae63e0)
+++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test.csproj (.../Ringtoets.WaveImpactAsphaltCover.Plugin.Test.csproj) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -92,6 +92,18 @@
{4a06df0d-5d75-4bad-a95a-a3db9b7c4ad5}
Core.Components.Gis.Forms
+
+ {420ED9C3-0C33-47EA-B893-121A9C0DB4F1}
+ Ringtoets.AssemblyTool.Data
+
+
+ {358B6DA2-A1DF-477F-B6AC-C30204265CB0}
+ Ringtoets.AssemblyTool.KernelWrapper
+
+
+ {0AB432BB-E2CC-42EA-A72C-7AFEF7536B38}
+ Ringtoets.AssemblyTool.KernelWrapper.TestUtil
+
{d4200f43-3f72-4f42-af0a-8ced416a38ec}
Ringtoets.Common.Data
Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverFailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -rdd923f77d094ac95c480fb99ccf638946f576ac8 -rdf515d3faf8f4db7a4b3358ad9d69092e5e9a8e3
--- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverFailureMechanismContextTreeNodeInfoTest.cs (.../WaveImpactAsphaltCoverFailureMechanismContextTreeNodeInfoTest.cs) (revision dd923f77d094ac95c480fb99ccf638946f576ac8)
+++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverFailureMechanismContextTreeNodeInfoTest.cs (.../WaveImpactAsphaltCoverFailureMechanismContextTreeNodeInfoTest.cs) (revision df515d3faf8f4db7a4b3358ad9d69092e5e9a8e3)
@@ -31,8 +31,12 @@
using Core.Common.TestUtil;
using NUnit.Framework;
using Rhino.Mocks;
+using Ringtoets.AssemblyTool.KernelWrapper.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators;
+using Ringtoets.AssemblyTool.KernelWrapper.TestUtil.Calculators.Categories;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.TestUtil;
using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.WaveImpactAsphaltCover.Data;
using Ringtoets.WaveImpactAsphaltCover.Forms.PresentationObjects;
@@ -185,8 +189,7 @@
public void ChildNodeObjects_FailureMechanismIsRelevant_ReturnChildDataNodes()
{
// Setup
- var assessmentSection = mocks.Stub();
- mocks.ReplayAll();
+ var assessmentSection = new AssessmentSectionStub();
var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism
{
@@ -236,8 +239,16 @@
var failureMechanismAssemblyCategoriesContext = (FailureMechanismAssemblyCategoriesContext) outputsFolder.Contents.ElementAt(0);
Assert.AreSame(failureMechanism, failureMechanismAssemblyCategoriesContext.WrappedData);
Assert.AreSame(assessmentSection, failureMechanismAssemblyCategoriesContext.AssessmentSection);
- Assert.AreEqual(failureMechanism.GeneralWaveImpactAsphaltCoverInput.N, failureMechanismAssemblyCategoriesContext.GetNFunc());
+ using (new AssemblyToolCalculatorFactoryConfig())
+ {
+ var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
+ AssemblyCategoriesCalculatorStub calculator = calculatorFactory.LastCreatedAssemblyCategoriesCalculator;
+
+ failureMechanismAssemblyCategoriesContext.GetFailureMechanismSectionAssemblyCategoriesFunc();
+ Assert.AreEqual(failureMechanism.GeneralWaveImpactAsphaltCoverInput.N, calculator.AssemblyCategoriesInput.N);
+ }
+
var failureMechanismResultsContext = (FailureMechanismSectionResultContext)
outputsFolder.Contents.ElementAt(1);
Assert.AreSame(failureMechanism, failureMechanismResultsContext.FailureMechanism);