Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanismAssemblyFactory.cs =================================================================== diff -u -rec2c838182ed237b3abd753347a861857129331b -r450fdfb2f034723cf74dc02d58cc1d9248f414a4 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanismAssemblyFactory.cs (.../MacroStabilityInwardsFailureMechanismAssemblyFactory.cs) (revision ec2c838182ed237b3abd753347a861857129331b) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanismAssemblyFactory.cs (.../MacroStabilityInwardsFailureMechanismAssemblyFactory.cs) (revision 450fdfb2f034723cf74dc02d58cc1d9248f414a4) @@ -19,21 +19,50 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Linq; using Riskeer.AssemblyTool.Data; using Riskeer.Common.Data.AssemblyTool; using Riskeer.Common.Data.AssessmentSection; +using Riskeer.Common.Data.Exceptions; using Riskeer.Common.Data.FailureMechanism; using Riskeer.Common.Data.Probability; namespace Riskeer.MacroStabilityInwards.Data { + /// + /// Factory for assembling assembly results for a macro stability inwards failure mechanism. + /// public static class MacroStabilityInwardsFailureMechanismAssemblyFactory { + /// + /// Assembles the section based on the input arguments. + /// + /// The section result to assemble. + /// The the section result belongs to. + /// The the section belongs to. + /// A . + /// Thrown when any argument is null. + /// Thrown when the section could not be assembled. public static FailureMechanismSectionAssemblyResult AssembleSection(AdoptableWithProfileProbabilityFailureMechanismSectionResult sectionResult, MacroStabilityInwardsFailureMechanism failureMechanism, IAssessmentSection assessmentSection) { + if (sectionResult == null) + { + throw new ArgumentNullException(nameof(sectionResult)); + } + + if (failureMechanism == null) + { + throw new ArgumentNullException(nameof(failureMechanism)); + } + + if (assessmentSection == null) + { + throw new ArgumentNullException(nameof(assessmentSection)); + } + MacroStabilityInwardsCalculationScenario[] calculationScenarios = failureMechanism.Calculations .OfType() .ToArray(); Fisheye: Tag 329e30ee29526f5fecbd3ec0282d8cf762a3fc2c refers to a dead (removed) revision in file `Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Data.Test/MacroStabilityInwardsFailureMechanismAssemblyFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Piping/test/Riskeer.Piping.Data.Test/PipingFailureMechanismAssemblyFactoryTest.cs =================================================================== diff -u -r1701ba2f2285c21eb6358de35af2a169b51f6b6e -r450fdfb2f034723cf74dc02d58cc1d9248f414a4 --- Riskeer/Piping/test/Riskeer.Piping.Data.Test/PipingFailureMechanismAssemblyFactoryTest.cs (.../PipingFailureMechanismAssemblyFactoryTest.cs) (revision 1701ba2f2285c21eb6358de35af2a169b51f6b6e) +++ Riskeer/Piping/test/Riskeer.Piping.Data.Test/PipingFailureMechanismAssemblyFactoryTest.cs (.../PipingFailureMechanismAssemblyFactoryTest.cs) (revision 450fdfb2f034723cf74dc02d58cc1d9248f414a4) @@ -121,6 +121,7 @@ sectionResult.RefinedSectionProbability = random.NextDouble(); var assessmentSection = new AssessmentSectionStub(); + using (new AssemblyToolCalculatorFactoryConfig()) { var calculatorFactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance;