Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/Waternet/WaternetKernelStub.cs =================================================================== diff -u -rbb00f605b488366c45f303a78a7194a2f60ff453 -r5859430bf93fa658cdceb8c2731de08f0a1c1ab7 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/Waternet/WaternetKernelStub.cs (.../WaternetKernelStub.cs) (revision bb00f605b488366c45f303a78a7194a2f60ff453) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/Waternet/WaternetKernelStub.cs (.../WaternetKernelStub.cs) (revision 5859430bf93fa658cdceb8c2731de08f0a1c1ab7) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using Deltares.WTIStability; using Deltares.WTIStability.Data.Geo; using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernels.Waternet; @@ -35,6 +36,11 @@ /// public bool Calculated { get; private set; } + /// + /// Indicator whether an exception must be thrown when performing the calculation. + /// + public bool ThrowExceptionOnCalculate { get; set; } + public StabilityLocation Location { get; set; } public SoilModel SoilModel { get; set; } @@ -45,6 +51,11 @@ public void Calculate() { + if (ThrowExceptionOnCalculate) + { + throw new WaternetKernelWrapperException($"Message 1{Environment.NewLine}Message 2", new Exception()); + } + Calculated = true; } }