Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/UpliftCalculatorStub.cs =================================================================== diff -u -r81fa8a9bf3bd503cbd280e88b8f6037a840cff12 -r913ebbe5aaf7355a6242dfb4a3168a7c6ff98d36 --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/UpliftCalculatorStub.cs (.../UpliftCalculatorStub.cs) (revision 81fa8a9bf3bd503cbd280e88b8f6037a840cff12) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/UpliftCalculatorStub.cs (.../UpliftCalculatorStub.cs) (revision 913ebbe5aaf7355a6242dfb4a3168a7c6ff98d36) @@ -19,7 +19,9 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Collections.Generic; +using Deltares.WTIPiping; using Ringtoets.Piping.KernelWrapper.SubCalculator; namespace Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator @@ -39,6 +41,11 @@ /// public bool Validated { get; private set; } + /// + /// Indicator whether an exception must be thrown when performing the calculation. + /// + public bool ThrowExceptionOnCalculate { get; set; } + public double EffectiveStress { get; set; } public double HExit { get; set; } public double HRiver { get; set; } @@ -52,6 +59,11 @@ public void Calculate() { + if (ThrowExceptionOnCalculate) + { + throw new WTIUpliftCalculatorException($"Message 1{Environment.NewLine}Message 2"); + } + Calculated = true; }