Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/FailurePathAssemblyCalculatorException.cs
===================================================================
diff -u
--- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/FailurePathAssemblyCalculatorException.cs (revision 0)
+++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/FailurePathAssemblyCalculatorException.cs (revision d11dfd7f052519df5b176d066a2d0dad3567720b)
@@ -0,0 +1,68 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Runtime.Serialization;
+
+namespace Riskeer.AssemblyTool.KernelWrapper.Calculators.Assembly
+{
+ ///
+ /// Exception thrown when an error occurs while performing a failure path assembly.
+ ///
+ [Serializable]
+ public class FailurePathAssemblyCalculatorException : Exception
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public FailurePathAssemblyCalculatorException() {}
+
+ ///
+ /// Initializes a new instance of the class
+ /// with a specified error message.
+ ///
+ /// The message that describes the error.
+ public FailurePathAssemblyCalculatorException(string message)
+ : base(message) {}
+
+ ///
+ /// Initializes a new instance of the class with a specified error message
+ /// and a reference to the inner exception that is the cause of this exception.
+ ///
+ /// The error message that explains the reason for the exception.
+ /// The exception that is the cause of the current exception,
+ /// or null if no inner exception is specified.
+ public FailurePathAssemblyCalculatorException(string message, Exception innerException) : base(message, innerException) {}
+
+ ///
+ /// Initializes a new instance of with
+ /// serialized data.
+ /// The that holds the serialized
+ /// object data about the exception being thrown.
+ /// The that contains contextual
+ /// information about the source or destination.
+ /// The parameter is
+ /// null.
+ /// The class name is null or
+ /// is zero (0).
+ protected FailurePathAssemblyCalculatorException(SerializationInfo info, StreamingContext context) : base(info, context) {}
+ }
+}
\ No newline at end of file
Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailurePathAssemblyCalculator.cs
===================================================================
diff -u -rf85d794366242406196101d825856b6e793523b4 -rd11dfd7f052519df5b176d066a2d0dad3567720b
--- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailurePathAssemblyCalculator.cs (.../IFailurePathAssemblyCalculator.cs) (revision f85d794366242406196101d825856b6e793523b4)
+++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/IFailurePathAssemblyCalculator.cs (.../IFailurePathAssemblyCalculator.cs) (revision d11dfd7f052519df5b176d066a2d0dad3567720b)
@@ -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;
@@ -29,6 +30,14 @@
///
public interface IFailurePathAssemblyCalculator
{
+ ///
+ /// Assembles a failure path based on the input.
+ ///
+ /// The length effect factor 'N' for an entire failure path.
+ /// A collection of .
+ /// A probability representing the assembly result of the failure path.
+ /// Thrown when is null.
+ /// Thrown when an error occurs while assembling.
double Assemble(double failurePathN, IEnumerable sectionAssemblyResults);
}
}
\ No newline at end of file
Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailurePathAssemblyCalculatorExceptionTest.cs
===================================================================
diff -u
--- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailurePathAssemblyCalculatorExceptionTest.cs (revision 0)
+++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailurePathAssemblyCalculatorExceptionTest.cs (revision d11dfd7f052519df5b176d066a2d0dad3567720b)
@@ -0,0 +1,32 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Riskeer.AssemblyTool.KernelWrapper.Calculators.Assembly;
+
+namespace Riskeer.AssemblyTool.KernelWrapper.Test.Calculators.Assembly
+{
+ [TestFixture]
+ public class FailurePathAssemblyCalculatorExceptionTest :
+ CustomExceptionDesignGuidelinesTestFixture {}
+}
\ No newline at end of file
Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailurePathAssemblyCalculatorTest.cs
===================================================================
diff -u -refffeffbef15761667281ffcf6b2cb48280e4a29 -rd11dfd7f052519df5b176d066a2d0dad3567720b
--- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailurePathAssemblyCalculatorTest.cs (.../FailurePathAssemblyCalculatorTest.cs) (revision efffeffbef15761667281ffcf6b2cb48280e4a29)
+++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.Test/Calculators/Assembly/FailurePathAssemblyCalculatorTest.cs (.../FailurePathAssemblyCalculatorTest.cs) (revision d11dfd7f052519df5b176d066a2d0dad3567720b)
@@ -116,6 +116,7 @@
// Assert
Assert.AreEqual(failurePathN, kernel.LenghtEffectFactor);
+ Assert.IsFalse(kernel.PartialAssembly);
AssertFailurePathSectionAssemblyResults(sectionAssemblyResults, kernel.FailurePathSectionAssemblyResults);
}
}