Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsOutput.cs
===================================================================
diff -u -rcb9ea4ad53b55626245ff8399d7cf0905185e632 -rb4f7b17762bbc3631a79febf60076c6d5a2eabd4
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsOutput.cs (.../GrassCoverErosionInwardsOutput.cs) (revision cb9ea4ad53b55626245ff8399d7cf0905185e632)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsOutput.cs (.../GrassCoverErosionInwardsOutput.cs) (revision b4f7b17762bbc3631a79febf60076c6d5a2eabd4)
@@ -19,10 +19,9 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using Core.Common.Base;
-using Core.Common.Base.Data;
using Ringtoets.Common.Data.Calculation;
-using Ringtoets.Common.Data.Probability;
namespace Ringtoets.GrassCoverErosionInwards.Data
{
@@ -37,10 +36,16 @@
/// The output of the assessment result.
/// The dike height output.
/// The overtopping rate output.
+ /// Thrown when
+ /// is null.
public GrassCoverErosionInwardsOutput(GrassCoverErosionInwardsResultOutput resultOutput,
DikeHeightOutput dikeHeightOutput,
OvertoppingRateOutput overtoppingRateOutput)
{
+ if (resultOutput == null)
+ {
+ throw new ArgumentNullException(nameof(resultOutput));
+ }
ResultOutput = resultOutput;
DikeHeightOutput = dikeHeightOutput;
OvertoppingRateOutput = overtoppingRateOutput;
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsOutputTest.cs
===================================================================
diff -u -rcb9ea4ad53b55626245ff8399d7cf0905185e632 -rb4f7b17762bbc3631a79febf60076c6d5a2eabd4
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsOutputTest.cs (.../GrassCoverErosionInwardsOutputTest.cs) (revision cb9ea4ad53b55626245ff8399d7cf0905185e632)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsOutputTest.cs (.../GrassCoverErosionInwardsOutputTest.cs) (revision b4f7b17762bbc3631a79febf60076c6d5a2eabd4)
@@ -19,6 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using Core.Common.Base;
using NUnit.Framework;
using Ringtoets.Common.Data.Calculation;
@@ -32,6 +33,20 @@
public class GrassCoverErosionInwardsOutputTest
{
[Test]
+ public void Constructor_ResultOutputNull_ThrowArgumentNullException()
+ {
+ // Call
+ TestDelegate test = () => new GrassCoverErosionInwardsOutput(
+ null,
+ new TestDikeHeightOutput(double.NaN),
+ new TestOvertoppingRateOutput(double.NaN));
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("resultOutput", exception.ParamName);
+ }
+
+ [Test]
public void ParameteredConstructor_DefaultValues()
{
// Setup