Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/DesignWaterLevelLocationsContextTest.cs =================================================================== diff -u -r802ea30d1fe8fbae93e58dff9ab054dbabca11ae -rc114776ae9eae9848dd5841211bbe2105ae57dc7 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/DesignWaterLevelLocationsContextTest.cs (.../DesignWaterLevelLocationsContextTest.cs) (revision 802ea30d1fe8fbae93e58dff9ab054dbabca11ae) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/DesignWaterLevelLocationsContextTest.cs (.../DesignWaterLevelLocationsContextTest.cs) (revision c114776ae9eae9848dd5841211bbe2105ae57dc7) @@ -19,10 +19,13 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; +using Core.Common.Base; using Core.Common.Controls.PresentationObjects; using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Integration.Forms.PresentationObjects; namespace Ringtoets.Integration.Forms.Test.PresentationObjects @@ -31,20 +34,34 @@ public class DesignWaterLevelLocationsContextTest { [Test] - public void DefaultConstructor_ExpectedValues() + public void Constructor_ExpectedValues() { // Setup var mockRepository = new MockRepository(); var assessmentSection = mockRepository.Stub(); mockRepository.ReplayAll(); + var locations = new ObservableList(); + // Call - var presentationObject = new DesignWaterLevelLocationsContext(assessmentSection); + var presentationObject = new DesignWaterLevelLocationsContext(locations, assessmentSection); // Assert - Assert.IsInstanceOf>(presentationObject); - Assert.AreSame(assessmentSection, presentationObject.WrappedData); + Assert.IsInstanceOf>>(presentationObject); + Assert.AreSame(locations, presentationObject.WrappedData); + Assert.AreSame(assessmentSection, presentationObject.AssessmentSection); mockRepository.VerifyAll(); } + + [Test] + public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new DesignWaterLevelLocationsContext(new ObservableList(), null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("assessmentSection", exception.ParamName); + } } } \ No newline at end of file