Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs =================================================================== diff -u -rf671892b6623f6561ec3752fd1a3e6344e9a2dbf -r02b7a16305179c5d4d67fe9bff0fe8b61db983e6 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision f671892b6623f6561ec3752fd1a3e6344e9a2dbf) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSection.cs (.../AssessmentSection.cs) (revision 02b7a16305179c5d4d67fe9bff0fe8b61db983e6) @@ -333,8 +333,14 @@ /// Adds hydraulic boundary location calculations for . /// /// The hydraulic boundary location to add calculations for. + /// Thrown when is null. public void AddHydraulicBoundaryLocationCalculations(HydraulicBoundaryLocation hydraulicBoundaryLocation) { + if (hydraulicBoundaryLocation == null) + { + throw new ArgumentNullException(nameof(hydraulicBoundaryLocation)); + } + designWaterLevelLocationCalculations1.Add(new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation)); designWaterLevelLocationCalculations2.Add(new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation)); designWaterLevelLocationCalculations3.Add(new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation)); Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs =================================================================== diff -u -re8353b7fea8fa71ebb78993774cf167d4faa8f1d -r02b7a16305179c5d4d67fe9bff0fe8b61db983e6 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs (.../AssessmentSectionTest.cs) (revision e8353b7fea8fa71ebb78993774cf167d4faa8f1d) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/AssessmentSectionTest.cs (.../AssessmentSectionTest.cs) (revision 02b7a16305179c5d4d67fe9bff0fe8b61db983e6) @@ -462,6 +462,20 @@ } [Test] + public void AddHydraulicBoundaryLocationCalculations_HydraulicBoundaryLocationNull_ThrowsArgumentNullException() + { + // Setup + var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike); + + // Call + TestDelegate test = () => assessmentSection.AddHydraulicBoundaryLocationCalculations(null); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("hydraulicBoundaryLocation", paramName); + } + + [Test] public void AddHydraulicBoundaryLocationCalculations_HydraulicBoundaryLocation_AddsExpectedCalculations() { // Setup