Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs =================================================================== diff -u -r9a001397536d9dcca5d009c8518478cdfcddbeca -r819a4413e76659295c4f62a5ccf204c19d2e7161 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs) (revision 9a001397536d9dcca5d009c8518478cdfcddbeca) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs) (revision 819a4413e76659295c4f62a5ccf204c19d2e7161) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.ComponentModel; using System.Linq; using Core.Common.Base; @@ -53,6 +54,40 @@ } [Test] + public void Constructor_DataIsNull_ThrowArgumentNullException() + { + // Setup + var handler = CreateSimpleHandler(); + mockRepository.ReplayAll(); + + // Call + TestDelegate test = () => new GrassCoverErosionInwardsFailureMechanismContextProperties(null, handler); + + // Assert + var paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("data", paramName); + mockRepository.VerifyAll(); + } + + [Test] + public void Constructor_ChangeHandlerIsNull_ThrowArgumentNullException() + { + // Setup + var assessmentSection = mockRepository.Stub(); + mockRepository.ReplayAll(); + + // Call + TestDelegate test = () => new GrassCoverErosionInwardsFailureMechanismContextProperties( + new GrassCoverErosionInwardsFailureMechanismContext(new GrassCoverErosionInwardsFailureMechanism(), assessmentSection), + null); + + // Assert + var paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("handler", paramName); + mockRepository.VerifyAll(); + } + + [Test] public void Constructor_ExpectedValues() { // Setup