Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculator.cs =================================================================== diff -u -r3ed87c53aea49ac019672432d88c97245129d8d6 -r882667e55a3e77e2679551c744688950eab842b7 --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculator.cs (.../IAssessmentSectionAssemblyCalculator.cs) (revision 3ed87c53aea49ac019672432d88c97245129d8d6) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IAssessmentSectionAssemblyCalculator.cs (.../IAssessmentSectionAssemblyCalculator.cs) (revision 882667e55a3e77e2679551c744688950eab842b7) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Collections.Generic; using Riskeer.AssemblyTool.Data; @@ -30,6 +31,20 @@ public interface IAssessmentSectionAssemblyCalculator { /// + /// Assembles an assessment section based on the input arguments. + /// + /// The collection of failure mechanism probabilities. + /// The lower limit norm to assemble with. + /// The signalling norm to assemble with. + /// A . + /// Thrown when is null. + /// Thrown when + /// an error occurs while assembling. + AssessmentSectionAssemblyResult AssembleAssessmentSection(IEnumerable failureMechanismProbabilities, + double lowerLimitNorm, + double signalingNorm); + + /// /// Assembles the combined assessment section for the given input. /// /// The collection of failure mechanism section collections to assemble for. Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs =================================================================== diff -u -r3ed87c53aea49ac019672432d88c97245129d8d6 -r882667e55a3e77e2679551c744688950eab842b7 --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs (.../AssessmentSectionAssemblyCalculatorStub.cs) (revision 3ed87c53aea49ac019672432d88c97245129d8d6) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Assembly/AssessmentSectionAssemblyCalculatorStub.cs (.../AssessmentSectionAssemblyCalculatorStub.cs) (revision 882667e55a3e77e2679551c744688950eab842b7) @@ -38,6 +38,26 @@ public bool ThrowExceptionOnCalculate { private get; set; } /// + /// Gets the failure mechanism probabilities input. + /// + public IEnumerable FailureMechanismProbabilitiesInput { get; private set; } + + /// + /// Gets the lower limit norm input. + /// + public double LowerLimitNormInput { get; private set; } + + /// + /// Gets the signaling norm input. + /// + public double SignalingNormInput { get; private set; } + + /// + /// Gets or sets the output of an assessment section assembly. + /// + public AssessmentSectionAssemblyResult AssessmentSectionAssemblyResult { get; set; } + + /// /// Gets the combined failure mechanism sections input. /// public IEnumerable> CombinedFailureMechanismSectionsInput { get; private set; } @@ -52,6 +72,20 @@ /// public IEnumerable CombinedFailureMechanismSectionAssemblyOutput { get; set; } + public AssessmentSectionAssemblyResult AssembleAssessmentSection(IEnumerable failureMechanismProbabilities, double lowerLimitNorm, double signalingNorm) + { + if (ThrowExceptionOnCalculate) + { + throw new AssessmentSectionAssemblyCalculatorException("Message", new Exception()); + } + + FailureMechanismProbabilitiesInput = failureMechanismProbabilities; + LowerLimitNormInput = lowerLimitNorm; + SignalingNormInput = signalingNorm; + + return AssessmentSectionAssemblyResult ?? (AssessmentSectionAssemblyResult = new AssessmentSectionAssemblyResult(0.14, AssessmentSectionAssemblyCategoryGroup.NotApplicable)); + } + public IEnumerable AssembleCombinedFailureMechanismSections( IEnumerable> input, double assessmentSectionLength) {