Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/InputContext.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/InputContext.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/InputContext.cs (revision ec73c499bd0bf4c69d03a69e131737afff769747)
@@ -0,0 +1,64 @@
+// Copyright (C) Stichting Deltares 2016. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Calculation;
+using Ringtoets.Common.Data.FailureMechanism;
+
+namespace Ringtoets.Common.Forms.PresentationObjects
+{
+ ///
+ /// Presentation object for all data required to configure calculation input.
+ ///
+ /// The type of calculation input wrapped by the context object.
+ /// The type of the calculation containing the calculation input.
+ /// The type of the failure mechanism which the context belongs to.
+ public class InputContext : FailureMechanismItemContextBase
+ where TInput : ICalculationInput
+ where TCalculation : ICalculation
+ where TFailureMechanism : IFailureMechanism
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The calculation input wrapped by the context object.
+ /// The calculation containing the calculation input.
+ /// The failure mechanism which the context belongs to.
+ /// The assessment section which the context belongs to.
+ /// When any input argument is null.
+ public InputContext(TInput wrappedData, TCalculation calculation, TFailureMechanism failureMechanism, IAssessmentSection assessmentSection)
+ : base(wrappedData, failureMechanism, assessmentSection)
+ {
+ if (calculation == null)
+ {
+ throw new ArgumentNullException("calculation");
+ }
+
+ Calculation = calculation;
+ }
+
+ ///
+ /// Gets the calculation item which the context belongs to.
+ ///
+ public TCalculation Calculation { get; private set; }
+ }
+}
\ No newline at end of file
Fisheye: Tag ec73c499bd0bf4c69d03a69e131737afff769747 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/InputContextBase.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs
===================================================================
diff -u -rfd6db3bae09296e4da11ac9fb9e5dde9b31bc178 -rec73c499bd0bf4c69d03a69e131737afff769747
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs (.../StructuresInputBaseProperties.cs) (revision fd6db3bae09296e4da11ac9fb9e5dde9b31bc178)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs (.../StructuresInputBaseProperties.cs) (revision ec73c499bd0bf4c69d03a69e131737afff769747)
@@ -51,7 +51,7 @@
/// The type of the calculation containing the structures calculation input.
/// The type of the failure mechanism.
public abstract class StructuresInputBaseProperties :
- ObjectProperties>,
+ ObjectProperties>,
IHasHydraulicBoundaryLocationProperty,
IHasStructureProperty,
IHasForeshoreProfileProperty
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj
===================================================================
diff -u -r29bdf364fd59627ccc39e9a302a40ea5f2d4da97 -rec73c499bd0bf4c69d03a69e131737afff769747
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 29bdf364fd59627ccc39e9a302a40ea5f2d4da97)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision ec73c499bd0bf4c69d03a69e131737afff769747)
@@ -62,7 +62,7 @@
-
+
Fisheye: Tag ec73c499bd0bf4c69d03a69e131737afff769747 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/InputContextBaseTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/InputContextTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/InputContextTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/InputContextTest.cs (revision ec73c499bd0bf4c69d03a69e131737afff769747)
@@ -0,0 +1,77 @@
+// Copyright (C) Stichting Deltares 2016. 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 NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Calculation;
+using Ringtoets.Common.Data.FailureMechanism;
+using Ringtoets.Common.Forms.PresentationObjects;
+
+namespace Ringtoets.Common.Forms.Test.PresentationObjects
+{
+ [TestFixture]
+ public class InputContextTest
+ {
+ [Test]
+ public void ParameteredConstructor_ExpectedValues()
+ {
+ // Setup
+ var mockRepository = new MockRepository();
+ var assessmentSectionStub = mockRepository.Stub();
+ var inputStub = mockRepository.Stub();
+ var calculationStub = mockRepository.Stub();
+ var failureMechanismStub = mockRepository.Stub();
+ mockRepository.ReplayAll();
+
+ // Call
+ var context = new InputContext(inputStub, calculationStub, failureMechanismStub, assessmentSectionStub);
+
+ // Assert
+ Assert.IsInstanceOf>(context);
+ Assert.AreSame(inputStub, context.WrappedData);
+ Assert.AreSame(calculationStub, context.Calculation);
+ Assert.AreSame(failureMechanismStub, context.FailureMechanism);
+ Assert.AreSame(assessmentSectionStub, context.AssessmentSection);
+ mockRepository.VerifyAll();
+ }
+
+ [Test]
+ public void ParameteredConstructor_CalculationIsNull_ThrowsArgumentNullException()
+ {
+ // Setup
+ var mockRepository = new MockRepository();
+ var assessmentSectionStub = mockRepository.Stub();
+ var inputStub = mockRepository.Stub();
+ var failureMechanismStub = mockRepository.Stub();
+ mockRepository.ReplayAll();
+
+ // Call
+ TestDelegate call = () => new InputContext(inputStub, null, failureMechanismStub, assessmentSectionStub);
+
+ // Assert
+ var exception = Assert.Throws(call);
+ Assert.AreEqual("calculation", exception.ParamName);
+ mockRepository.VerifyAll();
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj
===================================================================
diff -u -r34a4f74321211475c627f5a78ed98359df5ee150 -rec73c499bd0bf4c69d03a69e131737afff769747
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision 34a4f74321211475c627f5a78ed98359df5ee150)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision ec73c499bd0bf4c69d03a69e131737afff769747)
@@ -67,7 +67,7 @@
-
+
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresInputContext.cs
===================================================================
diff -u -rcad219225ee11e816a86a0763d7b888a4d49d8a0 -rec73c499bd0bf4c69d03a69e131737afff769747
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresInputContext.cs (.../HeightStructuresInputContext.cs) (revision cad219225ee11e816a86a0763d7b888a4d49d8a0)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PresentationObjects/HeightStructuresInputContext.cs (.../HeightStructuresInputContext.cs) (revision ec73c499bd0bf4c69d03a69e131737afff769747)
@@ -30,7 +30,7 @@
/// Presentation object for all data required to configure an instance of
/// in order to be able to configure height structures calculations.
///
- public class HeightStructuresInputContext : InputContextBase
+ public class HeightStructuresInputContext : InputContext
{
///
/// Creates a new instance of .