Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs
===================================================================
diff -u -r6ccc539ce58e63f0e0fbff0da189c87b65146129 -rd207738be4ce6f50f4e3e00839ea433acea10bbd
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs (.../HeightStructuresCalculationActivity.cs) (revision 6ccc539ce58e63f0e0fbff0da189c87b65146129)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs (.../HeightStructuresCalculationActivity.cs) (revision d207738be4ce6f50f4e3e00839ea433acea10bbd)
@@ -19,6 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using System.Linq;
using Core.Common.Base.Service;
using Ringtoets.Common.Data.AssessmentSection;
@@ -54,9 +55,27 @@
/// The directory of the HLCD file that should be used for performing the calculation.
/// The failure mechanism the calculation belongs to.
/// The assessment section the calculation belongs to.
+ /// Thrown when any input argument is null.
public HeightStructuresCalculationActivity(HeightStructuresCalculation calculation, string hlcdDirectory,
HeightStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection)
{
+ if (calculation == null)
+ {
+ throw new ArgumentNullException("calculation");
+ }
+ if (hlcdDirectory == null)
+ {
+ throw new ArgumentNullException("hlcdDirectory");
+ }
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException("failureMechanism");
+ }
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException("assessmentSection");
+ }
+
this.calculation = calculation;
this.hlcdDirectory = hlcdDirectory;
this.failureMechanism = failureMechanism;