Index: Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs
===================================================================
diff -u -ra5cd9b063d07cb1205e7691b7ff38fc393005210 -r211ed9d209b72a515105428e9ad08ec6972ad95d
--- Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision a5cd9b063d07cb1205e7691b7ff38fc393005210)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision 211ed9d209b72a515105428e9ad08ec6972ad95d)
@@ -36,7 +36,7 @@
using Ringtoets.HydraRing.Calculation.Calculator.Factory;
using Ringtoets.HydraRing.Calculation.Data.Input.Hydraulics;
using Ringtoets.HydraRing.Calculation.Exceptions;
-using HydraGeneralResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.GeneralResult;
+using HydraRingGeneralResult = Ringtoets.HydraRing.Calculation.Data.Output.IllustrationPoints.GeneralResult;
namespace Ringtoets.Common.Service
{
@@ -206,15 +206,26 @@
waveHeightCalculation.Output = hydraulicBoundaryLocationOutput;
}
+ ///
+ /// Sets a based on the information
+ /// of to the .
+ ///
+ /// The
+ /// to set the .
+ /// The to base the
+ /// to create on.
+ /// Thrown when
+ /// is null.
private static void SetIllustrationPointsResult(HydraulicBoundaryLocationOutput hydraulicBoundaryLocationOutput,
- HydraGeneralResult hydraGeneralResult)
+ HydraRingGeneralResult hydraRingGeneralResult)
{
- if (hydraGeneralResult != null)
+ if (hydraRingGeneralResult == null)
{
- GeneralResultSubMechanismIllustrationPoint generalResult =
- GeneralResultSubmechanismIllustrationPointConverter.CreateGeneralResultSubmechanismIllustrationPoint(hydraGeneralResult);
- hydraulicBoundaryLocationOutput.SetIllustrationPoints(generalResult);
+ throw new HydraRingCalculationException(Resources.DesignWaterLevelCalculationService_SetIllustrationPointsResult_No_general_result_found);
}
+ GeneralResultSubMechanismIllustrationPoint generalResult =
+ GeneralResultSubmechanismIllustrationPointConverter.CreateGeneralResultSubmechanismIllustrationPoint(hydraRingGeneralResult);
+ hydraulicBoundaryLocationOutput.SetIllustrationPoints(generalResult);
}
///