Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/WaveHeightLocationsGroupContext.cs =================================================================== diff -u --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/WaveHeightLocationsGroupContext.cs (revision 0) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PresentationObjects/WaveHeightLocationsGroupContext.cs (revision ea24362eecb0eb22d279899db504a3f76e17795c) @@ -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 wave height calculation result. + /// + public class WaveHeightLocationsGroupContext : ObservableWrappedObjectContextBase> + { + /// + /// Creates a new instance of . + /// + /// The locations that the belongs to. + /// The that the belongs to. + /// Thrown when any parameter is null. + public WaveHeightLocationsGroupContext(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 -rb39e76c3a94ad3c80cf028dfb66bf12284c9ef63 -rea24362eecb0eb22d279899db504a3f76e17795c --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj (.../Ringtoets.Integration.Forms.csproj) (revision b39e76c3a94ad3c80cf028dfb66bf12284c9ef63) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj (.../Ringtoets.Integration.Forms.csproj) (revision ea24362eecb0eb22d279899db504a3f76e17795c) @@ -35,6 +35,7 @@ + Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/WaveHeightLocationsGroupContextTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/WaveHeightLocationsGroupContextTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/WaveHeightLocationsGroupContextTest.cs (revision ea24362eecb0eb22d279899db504a3f76e17795c) @@ -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 WaveHeightLocationsGroupContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mockRepository = new MockRepository(); + var assessmentSection = mockRepository.Stub(); + mockRepository.ReplayAll(); + + var locations = new ObservableList(); + + // Call + var presentationObject = new WaveHeightLocationsGroupContext(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 WaveHeightLocationsGroupContext(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 -rb39e76c3a94ad3c80cf028dfb66bf12284c9ef63 -rea24362eecb0eb22d279899db504a3f76e17795c --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision b39e76c3a94ad3c80cf028dfb66bf12284c9ef63) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision ea24362eecb0eb22d279899db504a3f76e17795c) @@ -40,6 +40,7 @@ +