Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs
===================================================================
diff -u -r5803ce0932a4a12266a4ac9befcda4a01a6a7840 -r535735859c84cb8dff86fed16ec47a0020eaec9d
--- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs (.../AssessmentSectionAssemblyCalculatorStub.cs) (revision 5803ce0932a4a12266a4ac9befcda4a01a6a7840)
+++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs (.../AssessmentSectionAssemblyCalculatorStub.cs) (revision 535735859c84cb8dff86fed16ec47a0020eaec9d)
@@ -21,7 +21,6 @@
using System;
using System.Collections.Generic;
-using System.Linq;
using Riskeer.AssemblyTool.Data;
using Riskeer.AssemblyTool.KernelWrapper.Calculators.Assembly;
@@ -57,21 +56,6 @@
///
public AssessmentSectionAssemblyResultWrapper AssessmentSectionAssemblyResult { get; set; }
- ///
- /// Gets the combined failure mechanism sections input.
- ///
- public IEnumerable> CombinedFailureMechanismSectionsInput { get; private set; }
-
- ///
- /// Gets the assessment section length input.
- ///
- public double AssessmentSectionLength { get; private set; }
-
- ///
- /// Gets or sets the output of the combined failure mechanism section assembly.
- ///
- public CombinedFailureMechanismSectionAssemblyResultWrapper CombinedFailureMechanismSectionAssemblyOutput { get; set; }
-
public AssessmentSectionAssemblyResultWrapper AssembleAssessmentSection(IEnumerable failureMechanismProbabilities, double maximumAllowableFloodingProbability, double signalFloodingProbability)
{
if (ThrowExceptionOnCalculate)
@@ -88,26 +72,5 @@
new AssessmentSectionAssemblyResult(0.14, AssessmentSectionAssemblyGroup.APlus),
AssemblyMethod.BOI2A1, AssemblyMethod.BOI2B1));
}
-
- public CombinedFailureMechanismSectionAssemblyResultWrapper AssembleCombinedFailureMechanismSections(
- IEnumerable> input, double assessmentSectionLength)
- {
- if (ThrowExceptionOnCalculate)
- {
- throw new AssessmentSectionAssemblyCalculatorException("Message", new Exception());
- }
-
- CombinedFailureMechanismSectionsInput = input;
- AssessmentSectionLength = assessmentSectionLength;
-
- return CombinedFailureMechanismSectionAssemblyOutput ?? (CombinedFailureMechanismSectionAssemblyOutput = new CombinedFailureMechanismSectionAssemblyResultWrapper(
- new[]
- {
- new CombinedFailureMechanismSectionAssembly(
- new CombinedAssemblyFailureMechanismSection(
- 0, 1, FailureMechanismSectionAssemblyGroup.Zero),
- input.Select(failureMechanism => FailureMechanismSectionAssemblyGroup.Dominant).ToArray())
- }, AssemblyMethod.BOI3A1, AssemblyMethod.BOI3B1, AssemblyMethod.BOI3C1));
- }
}
}
\ No newline at end of file
Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/Exporters/AssemblyExporterTest.cs
===================================================================
diff -u -r80a56581e3ae390973d398e93f1cc9ac07782941 -r535735859c84cb8dff86fed16ec47a0020eaec9d
--- Riskeer/Integration/test/Riskeer.Integration.IO.Test/Exporters/AssemblyExporterTest.cs (.../AssemblyExporterTest.cs) (revision 80a56581e3ae390973d398e93f1cc9ac07782941)
+++ Riskeer/Integration/test/Riskeer.Integration.IO.Test/Exporters/AssemblyExporterTest.cs (.../AssemblyExporterTest.cs) (revision 535735859c84cb8dff86fed16ec47a0020eaec9d)
@@ -20,7 +20,6 @@
// All rights reserved.
using System;
-using System.Collections.Generic;
using System.IO;
using System.Linq;
using Core.Common.Base.Geometry;
@@ -117,7 +116,6 @@
using (new AssemblyToolCalculatorFactoryConfig())
{
var exporter = new AssemblyExporter(assessmentSection, filePath);
- SetCombinedFailureMechanismSectionAssemblyOutput(assessmentSection);
// Call & Assert
if (isExportExpectedToBeSuccessful)
@@ -207,8 +205,6 @@
using (new FileDisposeHelper(filePath))
using (new AssemblyToolCalculatorFactoryConfig())
{
- SetCombinedFailureMechanismSectionAssemblyOutput(assessmentSection);
-
try
{
// Call
@@ -245,11 +241,6 @@
using (var fileDisposeHelper = new FileDisposeHelper(filePath))
using (new AssemblyToolCalculatorFactoryConfig())
{
- var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
- AssessmentSectionAssemblyCalculatorStub assessmentSectionAssemblyCalculator = calculatorFactory.LastCreatedAssessmentSectionAssemblyCalculator;
- assessmentSectionAssemblyCalculator.CombinedFailureMechanismSectionAssemblyOutput = new CombinedFailureMechanismSectionAssemblyResultWrapper(
- Array.Empty(), AssemblyMethod.BOI3A1, AssemblyMethod.BOI3B1, AssemblyMethod.BOI3C1);
-
fileDisposeHelper.LockFiles();
// Call
@@ -312,22 +303,5 @@
return assessmentSection;
}
-
- private static void SetCombinedFailureMechanismSectionAssemblyOutput(IAssessmentSection assessmentSection)
- {
- IEnumerable failureMechanisms = assessmentSection.GetFailureMechanisms()
- .Concat(assessmentSection.SpecificFailureMechanisms);
-
- var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;
- AssessmentSectionAssemblyCalculatorStub assessmentSectionAssemblyCalculator = calculatorFactory.LastCreatedAssessmentSectionAssemblyCalculator;
- assessmentSectionAssemblyCalculator.CombinedFailureMechanismSectionAssemblyOutput = new CombinedFailureMechanismSectionAssemblyResultWrapper(
- new[]
- {
- new CombinedFailureMechanismSectionAssembly(new CombinedAssemblyFailureMechanismSection(0, 2.5, FailureMechanismSectionAssemblyGroup.II),
- failureMechanisms.Select(fm => FailureMechanismSectionAssemblyGroup.II)),
- new CombinedFailureMechanismSectionAssembly(new CombinedAssemblyFailureMechanismSection(2.5, 5, FailureMechanismSectionAssemblyGroup.III),
- failureMechanisms.Select(fm => FailureMechanismSectionAssemblyGroup.III))
- }, AssemblyMethod.BOI3A1, AssemblyMethod.BOI3B1, AssemblyMethod.BOI3C1);
- }
}
}
\ No newline at end of file