Index: Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs
===================================================================
diff -u -r248229db928c9e5556be704ed274226f80b4ef19 -r1042a38d3663daeda5a8e1083edbc63a4b6aae94
--- Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs (.../DesignWaterLevelCalculationActivity.cs) (revision 248229db928c9e5556be704ed274226f80b4ef19)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs (.../DesignWaterLevelCalculationActivity.cs) (revision 1042a38d3663daeda5a8e1083edbc63a4b6aae94)
@@ -46,29 +46,27 @@
///
/// Creates a new instance of .
///
- /// The provider of the messages to use during the calculation.
/// The to perform the calculation for.
/// The HLCD file that should be used for performing the calculation.
/// The id of the ring to perform the calculation for.
/// The norm to use during the calculation.
+ /// The provider of the messages to use during the calculation.
/// Thrown when is null.
- public DesignWaterLevelCalculationActivity(ICalculationMessageProvider messageProvider,
- IHydraulicBoundaryLocation hydraulicBoundaryLocation,
- string hydraulicBoundaryDatabaseFilePath,
- string ringId, double norm)
+ public DesignWaterLevelCalculationActivity(IHydraulicBoundaryLocation hydraulicBoundaryLocation, string hydraulicBoundaryDatabaseFilePath, string ringId, double norm, ICalculationMessageProvider messageProvider)
{
- if (messageProvider == null)
+ if (hydraulicBoundaryLocation == null)
{
- throw new ArgumentNullException("messageProvider");
+ throw new ArgumentNullException("hydraulicBoundaryLocation");
}
- this.messageProvider = messageProvider;
- if (hydraulicBoundaryLocation == null)
+ if (messageProvider == null)
{
- throw new ArgumentNullException("hydraulicBoundaryLocation");
+ throw new ArgumentNullException("messageProvider");
}
+
this.hydraulicBoundaryLocation = hydraulicBoundaryLocation;
-
+ this.messageProvider = messageProvider;
+
this.hydraulicBoundaryDatabaseFilePath = hydraulicBoundaryDatabaseFilePath;
this.ringId = ringId;
this.norm = norm;
@@ -86,7 +84,7 @@
PerformRun(() => DesignWaterLevelCalculationService.Instance.Validate(
messageProvider.GetCalculationName(hydraulicBoundaryLocation.Name), hydraulicBoundaryDatabaseFilePath),
- () => hydraulicBoundaryLocation.DesignWaterLevel = (RoundedDouble) double.NaN,
+ () => RingtoetsCommonDataSynchronizationService.ClearDesignWaterLevel(hydraulicBoundaryLocation),
() => DesignWaterLevelCalculationService.Instance.Calculate(hydraulicBoundaryLocation,
hydraulicBoundaryDatabaseFilePath,
ringId,