Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/DesignWaterLevelLocationsGroupContext.cs =================================================================== diff -u --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/DesignWaterLevelLocationsGroupContext.cs (revision 0) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/DesignWaterLevelLocationsGroupContext.cs (revision b39e76c3a94ad3c80cf028dfb66bf12284c9ef63) @@ -0,0 +1,59 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// 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 Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.Hydraulics; + +namespace Ringtoets.Integration.Forms.PresentationObjects +{ + /// + /// Presentation object for all data required to configure multiple enumerations of + /// with a design water level calculation result. + /// + public class DesignWaterLevelLocationsGroupContext : ObservableWrappedObjectContextBase> + { + /// + /// Creates a new instance of . + /// + /// The locations that the belongs to. + /// The that the belongs to. + /// Thrown when any parameter is null. + public DesignWaterLevelLocationsGroupContext(ObservableList wrappedData, + IAssessmentSection assessmentSection) + : base(wrappedData) + { + if (assessmentSection == null) + { + throw new ArgumentNullException(nameof(assessmentSection)); + } + + AssessmentSection = assessmentSection; + } + + /// + /// Gets the assessment section that the context belongs to. + /// + public IAssessmentSection AssessmentSection { get; } + } +} \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj =================================================================== diff -u -r65ce8c5ab171b234e33e2291998c9d89276db896 -rb39e76c3a94ad3c80cf028dfb66bf12284c9ef63 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj (.../Ringtoets.Integration.Forms.csproj) (revision 65ce8c5ab171b234e33e2291998c9d89276db896) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj (.../Ringtoets.Integration.Forms.csproj) (revision b39e76c3a94ad3c80cf028dfb66bf12284c9ef63) @@ -28,6 +28,7 @@ + Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/DesignWaterLevelLocationsGroupContextTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/DesignWaterLevelLocationsGroupContextTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/DesignWaterLevelLocationsGroupContextTest.cs (revision b39e76c3a94ad3c80cf028dfb66bf12284c9ef63) @@ -0,0 +1,67 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// 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 +{ + [TestFixture] + public class DesignWaterLevelLocationsGroupContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mockRepository = new MockRepository(); + var assessmentSection = mockRepository.Stub(); + mockRepository.ReplayAll(); + + var locations = new ObservableList(); + + // Call + var presentationObject = new DesignWaterLevelLocationsGroupContext(locations, assessmentSection); + + // Assert + 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 DesignWaterLevelLocationsGroupContext(new ObservableList(), null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("assessmentSection", exception.ParamName); + } + } +} \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj =================================================================== diff -u -r65ce8c5ab171b234e33e2291998c9d89276db896 -rb39e76c3a94ad3c80cf028dfb66bf12284c9ef63 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision 65ce8c5ab171b234e33e2291998c9d89276db896) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision b39e76c3a94ad3c80cf028dfb66bf12284c9ef63) @@ -37,6 +37,7 @@ +