Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismSectionResultContext.cs
===================================================================
diff -u -r6ef5e439a6d9f40ebd9926251945e0935fbbc314 -rf1c2db8c066ce430155473bfb57ccfaccb64c035
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismSectionResultContext.cs (.../FailureMechanismSectionResultContext.cs) (revision 6ef5e439a6d9f40ebd9926251945e0935fbbc314)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismSectionResultContext.cs (.../FailureMechanismSectionResultContext.cs) (revision f1c2db8c066ce430155473bfb57ccfaccb64c035)
@@ -29,6 +29,7 @@
///
/// This class is a presentation object for a collection of .
///
+ /// The type of .
public class FailureMechanismSectionResultContext : WrappedObjectContextBase> where T : FailureMechanismSectionResult
{
///
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/ProbabilityFailureMechanismSectionResultContext.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/ProbabilityFailureMechanismSectionResultContext.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/ProbabilityFailureMechanismSectionResultContext.cs (revision f1c2db8c066ce430155473bfb57ccfaccb64c035)
@@ -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 System.Collections.Generic;
+using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.FailureMechanism;
+
+namespace Ringtoets.Common.Forms.PresentationObjects
+{
+ ///
+ /// This class is a presentation object for a collection of .
+ ///
+ /// /// The type of .
+ public class ProbabilityFailureMechanismSectionResultContext : FailureMechanismSectionResultContext where T : FailureMechanismSectionResult
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The of to wrap.
+ /// The the belongs to.
+ /// The assessment section the section results belongs to.
+ /// Thrown when any parameter is null.
+ public ProbabilityFailureMechanismSectionResultContext(IEnumerable wrappedSectionResults, IFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ : base(wrappedSectionResults, failureMechanism)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ AssessmentSection = assessmentSection;
+ }
+
+ ///
+ /// Gets the assessment section.
+ ///
+ public IAssessmentSection AssessmentSection { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj
===================================================================
diff -u -r7111575120feef926652228c88b963ae1c18287e -rf1c2db8c066ce430155473bfb57ccfaccb64c035
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 7111575120feef926652228c88b963ae1c18287e)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision f1c2db8c066ce430155473bfb57ccfaccb64c035)
@@ -46,6 +46,7 @@
+
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ProbabilityFailureMechanismSectionResultContextTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ProbabilityFailureMechanismSectionResultContextTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ProbabilityFailureMechanismSectionResultContextTest.cs (revision f1c2db8c066ce430155473bfb57ccfaccb64c035)
@@ -0,0 +1,71 @@
+// 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 System.Collections.Generic;
+using System.Linq;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.FailureMechanism;
+using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.Common.Forms.PresentationObjects;
+
+namespace Ringtoets.Common.Forms.Test.PresentationObjects
+{
+ [TestFixture]
+ public class ProbabilityFailureMechanismSectionResultContextTest
+ {
+ [Test]
+ public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate call = () => new ProbabilityFailureMechanismSectionResultContext(Enumerable.Empty(),
+ new TestFailureMechanism(), null);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("assessmentSection", exception.ParamName);
+ }
+
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var assessmentSection = mocks.Stub();
+ mocks.ReplayAll();
+
+ IEnumerable sectionResults = Enumerable.Empty();
+ var failureMechanism = new TestFailureMechanism();
+
+ // Call
+ var context = new ProbabilityFailureMechanismSectionResultContext(sectionResults, failureMechanism, assessmentSection);
+
+ // Assert
+ Assert.IsInstanceOf>(context);
+ Assert.AreSame(sectionResults, context.WrappedData);
+ Assert.AreSame(failureMechanism, context.FailureMechanism);
+ Assert.AreSame(assessmentSection, context.AssessmentSection);
+ mocks.VerifyAll();
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj
===================================================================
diff -u -r1ad608d6d74fd2ee54be546f1ea368baf4c5db1d -rf1c2db8c066ce430155473bfb57ccfaccb64c035
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision 1ad608d6d74fd2ee54be546f1ea368baf4c5db1d)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision f1c2db8c066ce430155473bfb57ccfaccb64c035)
@@ -66,6 +66,7 @@
+