Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PresentationObjects/GrassCoverErosionOutwardsWaveConditionsInputContext.cs
===================================================================
diff -u -rfcd32c8e949b4581cc20adcaa7cf7639fcb69d20 -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PresentationObjects/GrassCoverErosionOutwardsWaveConditionsInputContext.cs (.../GrassCoverErosionOutwardsWaveConditionsInputContext.cs) (revision fcd32c8e949b4581cc20adcaa7cf7639fcb69d20)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PresentationObjects/GrassCoverErosionOutwardsWaveConditionsInputContext.cs (.../GrassCoverErosionOutwardsWaveConditionsInputContext.cs) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -21,7 +21,6 @@
using System;
using System.Collections.Generic;
-using Ringtoets.Common.Data.Calculation;
using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Data.Hydraulics;
using Ringtoets.GrassCoverErosionOutwards.Data;
@@ -46,7 +45,7 @@
/// the context belongs to.
/// Thrown when any parameter is null.
public GrassCoverErosionOutwardsWaveConditionsInputContext(WaveConditionsInput wrappedData,
- ICalculation calculation,
+ IWaveConditionsCalculation calculation,
GrassCoverErosionOutwardsFailureMechanism failureMechanism)
: base(wrappedData, calculation)
{
Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs
===================================================================
diff -u -ra70cb733eb761229173777b9f6cd1b977830b24b -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision a70cb733eb761229173777b9f6cd1b977830b24b)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -243,15 +243,6 @@
.AddPropertiesItem()
.Build()
};
-
- yield return new TreeNodeInfo
- {
- Text = context => RingtoetsCommonFormsResources.Calculation_Input,
- Image = context => RingtoetsCommonFormsResources.GenericInputOutputIcon,
- ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl)
- .AddPropertiesItem()
- .Build()
- };
}
public override IEnumerable GetExportInfos()
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsWaveConditionsInputContextTest.cs
===================================================================
diff -u -rfcd32c8e949b4581cc20adcaa7cf7639fcb69d20 -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsWaveConditionsInputContextTest.cs (.../GrassCoverErosionOutwardsWaveConditionsInputContextTest.cs) (revision fcd32c8e949b4581cc20adcaa7cf7639fcb69d20)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PresentationObjects/GrassCoverErosionOutwardsWaveConditionsInputContextTest.cs (.../GrassCoverErosionOutwardsWaveConditionsInputContextTest.cs) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -27,7 +27,7 @@
using Ringtoets.GrassCoverErosionOutwards.Data;
using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects;
using Ringtoets.Revetment.Data;
-using TestCalculation = Ringtoets.Common.Forms.TestUtil.TestCalculation;
+using Ringtoets.Revetment.TestUtil;
namespace Ringtoets.GrassCoverErosionOutwards.Forms.Test.PresentationObjects
{
@@ -77,7 +77,7 @@
// Call
TestDelegate test = () => new GrassCoverErosionOutwardsWaveConditionsInputContext(
null,
- new TestCalculation(),
+ new TestWaveConditionsCalculation(),
failureMechanism);
// Assert
@@ -112,7 +112,7 @@
// Call
TestDelegate test = () => new GrassCoverErosionOutwardsWaveConditionsInputContext(
input,
- new TestCalculation(),
+ new TestWaveConditionsCalculation(),
null);
// Assert
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveConditionsInputContextPropertiesTest.cs
===================================================================
diff -u -rfcd32c8e949b4581cc20adcaa7cf7639fcb69d20 -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveConditionsInputContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveConditionsInputContextPropertiesTest.cs) (revision fcd32c8e949b4581cc20adcaa7cf7639fcb69d20)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveConditionsInputContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveConditionsInputContextPropertiesTest.cs) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -25,12 +25,12 @@
using NUnit.Framework;
using Rhino.Mocks;
using Ringtoets.Common.Forms.PropertyClasses;
-using Ringtoets.Common.Forms.TestUtil;
using Ringtoets.GrassCoverErosionOutwards.Data;
using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects;
using Ringtoets.GrassCoverErosionOutwards.Forms.PropertyClasses;
using Ringtoets.Revetment.Data;
using Ringtoets.Revetment.Forms.PropertyClasses;
+using Ringtoets.Revetment.TestUtil;
namespace Ringtoets.GrassCoverErosionOutwards.Forms.Test.PropertyClasses
{
@@ -69,7 +69,7 @@
var context = new GrassCoverErosionOutwardsWaveConditionsInputContext(
new WaveConditionsInput(),
- new TestCalculation(),
+ new TestWaveConditionsCalculation(),
new GrassCoverErosionOutwardsFailureMechanism());
// Call
@@ -87,7 +87,7 @@
// Setup
var context = new GrassCoverErosionOutwardsWaveConditionsInputContext(
new WaveConditionsInput(),
- new TestCalculation(),
+ new TestWaveConditionsCalculation(),
new GrassCoverErosionOutwardsFailureMechanism());
// Call
@@ -105,7 +105,7 @@
// Setup
var context = new GrassCoverErosionOutwardsWaveConditionsInputContext(
new WaveConditionsInput(),
- new TestCalculation(),
+ new TestWaveConditionsCalculation(),
new GrassCoverErosionOutwardsFailureMechanism());
// Call
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/GrassCoverErosionOutwardsPluginTest.cs
===================================================================
diff -u -rfcd32c8e949b4581cc20adcaa7cf7639fcb69d20 -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/GrassCoverErosionOutwardsPluginTest.cs (.../GrassCoverErosionOutwardsPluginTest.cs) (revision fcd32c8e949b4581cc20adcaa7cf7639fcb69d20)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/GrassCoverErosionOutwardsPluginTest.cs (.../GrassCoverErosionOutwardsPluginTest.cs) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -96,7 +96,7 @@
TreeNodeInfo[] treeNodeInfos = plugin.GetTreeNodeInfos().ToArray();
// Assert
- Assert.AreEqual(10, treeNodeInfos.Length);
+ Assert.AreEqual(9, treeNodeInfos.Length);
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(GrassCoverErosionOutwardsFailureMechanismContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(HydraulicBoundariesGroupContext)));
@@ -106,7 +106,6 @@
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(GrassCoverErosionOutwardsWaveConditionsCalculationContext)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyGrassCoverErosionOutwardsOutput)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(GrassCoverErosionOutwardsWaveConditionsOutput)));
- Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(GrassCoverErosionOutwardsWaveConditionsInputContext)));
}
}
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj
===================================================================
diff -u -r08b3bcba439831d547684b194ecdf903f2519700 -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj) (revision 08b3bcba439831d547684b194ecdf903f2519700)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Plugin.Test.csproj) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -78,7 +78,6 @@
-
Fisheye: Tag ec15ff35b39f333c422b8ca6988c34bd8573f134 refers to a dead (removed) revision in file `Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsInputContextTreeNodeInfoTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj
===================================================================
diff -u -r08b3bcba439831d547684b194ecdf903f2519700 -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj (.../Ringtoets.Integration.Plugin.csproj) (revision 08b3bcba439831d547684b194ecdf903f2519700)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj (.../Ringtoets.Integration.Plugin.csproj) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -133,6 +133,10 @@
Ringtoets.DuneErosion.PluginFalse
+
+ {AF1ACFA2-AEE5-4DB7-98CA-8B3720E46AD9}
+ Ringtoets.Revetment.Forms
+ {3D4B9740-8348-4434-8D77-B611FC6EE57F}Ringtoets.StabilityPointStructures.Data
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs
===================================================================
diff -u -ra70cb733eb761229173777b9f6cd1b977830b24b -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision a70cb733eb761229173777b9f6cd1b977830b24b)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -83,6 +83,7 @@
using Ringtoets.Integration.Service.MessageProviders;
using Ringtoets.Piping.Data;
using Ringtoets.Piping.Forms.PresentationObjects;
+using Ringtoets.Revetment.Forms.PresentationObjects;
using Ringtoets.StabilityPointStructures.Data;
using Ringtoets.StabilityPointStructures.Forms.PresentationObjects;
using Ringtoets.StabilityStoneCover.Data;
@@ -691,6 +692,15 @@
.Build();
}
};
+
+ yield return new TreeNodeInfo
+ {
+ Text = context => RingtoetsCommonFormsResources.Calculation_Input,
+ Image = context => RingtoetsCommonFormsResources.GenericInputOutputIcon,
+ ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl)
+ .AddPropertiesItem()
+ .Build()
+ };
}
private static ViewInfo, IEnumerable, TView> CreateFailureMechanismResultViewInfo()
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Ringtoets.Integration.Plugin.Test.csproj
===================================================================
diff -u -r08b3bcba439831d547684b194ecdf903f2519700 -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Ringtoets.Integration.Plugin.Test.csproj (.../Ringtoets.Integration.Plugin.Test.csproj) (revision 08b3bcba439831d547684b194ecdf903f2519700)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Ringtoets.Integration.Plugin.Test.csproj (.../Ringtoets.Integration.Plugin.Test.csproj) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -112,6 +112,7 @@
+
@@ -277,6 +278,14 @@
{87c2c553-c0bc-40bf-b1ea-b83bff357f27}Ringtoets.Revetment.Data
+
+ {AF1ACFA2-AEE5-4DB7-98CA-8B3720E46AD9}
+ Ringtoets.Revetment.Forms
+
+
+ {3706200E-48C6-4B86-B48C-4E45C69ABE95}
+ Ringtoets.Revetment.Data.TestUtil
+ {3d4b9740-8348-4434-8d77-b611fc6ee57f}Ringtoets.StabilityPointStructures.Data
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs
===================================================================
diff -u -r802ea30d1fe8fbae93e58dff9ab054dbabca11ae -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision 802ea30d1fe8fbae93e58dff9ab054dbabca11ae)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -55,6 +55,7 @@
using Ringtoets.Integration.Forms.PropertyClasses;
using Ringtoets.Integration.Forms.Views;
using Ringtoets.Integration.Forms.Views.SectionResultViews;
+using Ringtoets.Revetment.Forms.PresentationObjects;
using RingtoetsCommonServiceResources = Ringtoets.Common.Service.Properties.Resources;
namespace Ringtoets.Integration.Plugin.Test
@@ -402,7 +403,7 @@
TreeNodeInfo[] treeNodeInfos = plugin.GetTreeNodeInfos().ToArray();
// Assert
- Assert.AreEqual(26, treeNodeInfos.Length);
+ Assert.AreEqual(27, treeNodeInfos.Length);
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(AssessmentSection)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(BackgroundData)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ReferenceLineContext)));
@@ -429,6 +430,7 @@
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ProbabilityAssessmentOutput)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyProbabilityAssessmentOutput)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(RingtoetsProject)));
+ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(WaveConditionsInputContext)));
}
}
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/WaveConditionsInputContextTreeNodeInfoTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/WaveConditionsInputContextTreeNodeInfoTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/WaveConditionsInputContextTreeNodeInfoTest.cs (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -0,0 +1,171 @@
+// 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.Drawing;
+using System.Linq;
+using Core.Common.Controls.TreeView;
+using Core.Common.Gui;
+using Core.Common.Gui.ContextMenu;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Ringtoets.Common.Data.DikeProfiles;
+using Ringtoets.Common.Data.Hydraulics;
+using Ringtoets.Common.Forms.Properties;
+using Ringtoets.Revetment.Data;
+using Ringtoets.Revetment.Forms.PresentationObjects;
+using Ringtoets.Revetment.TestUtil;
+
+namespace Ringtoets.Integration.Plugin.Test.TreeNodeInfos
+{
+ [TestFixture]
+ public class WaveConditionsInputContextTreeNodeInfoTest
+ {
+ [Test]
+ public void Initialized_Always_ExpectedPropertiesSet()
+ {
+ // Setup
+ using (var plugin = new RingtoetsPlugin())
+ {
+ TreeNodeInfo info = GetInfo(plugin);
+
+ // Assert
+ Assert.IsNotNull(info.Text);
+ Assert.IsNull(info.ForeColor);
+ Assert.IsNotNull(info.Image);
+ Assert.IsNotNull(info.ContextMenuStrip);
+ Assert.IsNull(info.EnsureVisibleOnCreate);
+ Assert.IsNull(info.ExpandOnCreate);
+ Assert.IsNull(info.ChildNodeObjects);
+ Assert.IsNull(info.CanRename);
+ Assert.IsNull(info.OnNodeRenamed);
+ Assert.IsNull(info.CanRemove);
+ Assert.IsNull(info.OnNodeRemoved);
+ Assert.IsNull(info.CanCheck);
+ Assert.IsNull(info.IsChecked);
+ Assert.IsNull(info.OnNodeChecked);
+ Assert.IsNull(info.CanDrag);
+ Assert.IsNull(info.CanDrop);
+ Assert.IsNull(info.CanInsert);
+ Assert.IsNull(info.OnDrop);
+ }
+ }
+
+ [Test]
+ public void Text_Always_ReturnName()
+ {
+ // Setup
+ var context = new TestWaveConditionsInputContext(new WaveConditionsInput());
+
+ using (var plugin = new RingtoetsPlugin())
+ {
+ TreeNodeInfo info = GetInfo(plugin);
+
+ // Call
+ string nodeText = info.Text(context);
+
+ // Assert
+ Assert.AreEqual("Invoer", nodeText);
+ }
+ }
+
+ [Test]
+ public void Image_Always_ReturnOutputIcon()
+ {
+ // Setup
+ var context = new TestWaveConditionsInputContext(new WaveConditionsInput());
+ using (var plugin = new RingtoetsPlugin())
+ {
+ TreeNodeInfo info = GetInfo(plugin);
+ // Call
+ Image icon = info.Image(context);
+
+ // Assert
+ TestHelper.AssertImagesAreEqual(Resources.GenericInputOutputIcon, icon);
+ }
+ }
+
+ [Test]
+ public void ContextMenuStrip_FailureMechanismIsRelevant_CallsContextMenuBuilderMethods()
+ {
+ // Setup
+ var mocks = new MockRepository();
+
+ using (var treeViewControl = new TreeViewControl())
+ {
+ var context = new TestWaveConditionsInputContext(new WaveConditionsInput());
+
+ var menuBuilder = mocks.StrictMock();
+ using (mocks.Ordered())
+ {
+ menuBuilder.Expect(mb => mb.AddPropertiesItem()).Return(menuBuilder);
+ menuBuilder.Expect(mb => mb.Build()).Return(null);
+ }
+
+ var gui = mocks.Stub();
+ gui.Stub(cmp => cmp.Get(context, treeViewControl)).Return(menuBuilder);
+ gui.Stub(g => g.ProjectOpened += null).IgnoreArguments();
+ gui.Stub(g => g.ProjectOpened -= null).IgnoreArguments();
+ mocks.ReplayAll();
+
+ using (var plugin = new RingtoetsPlugin())
+ {
+ TreeNodeInfo info = GetInfo(plugin);
+ plugin.Gui = gui;
+
+ // Call
+ info.ContextMenuStrip(context, null, treeViewControl);
+ }
+ }
+
+ // Assert
+ mocks.VerifyAll();
+ }
+
+ private static TreeNodeInfo GetInfo(RingtoetsPlugin plugin)
+ {
+ return plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(WaveConditionsInputContext));
+ }
+
+ private class TestWaveConditionsInputContext : WaveConditionsInputContext
+ {
+ public TestWaveConditionsInputContext(WaveConditionsInput wrappedData) : base(wrappedData, new TestWaveConditionsCalculation()) { }
+
+ public override IEnumerable HydraulicBoundaryLocations
+ {
+ get
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ public override IEnumerable ForeshoreProfiles
+ {
+ get
+ {
+ throw new NotImplementedException();
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PresentationObjects/WaveConditionsInputContext.cs
===================================================================
diff -u -r0ee0d86b58275264171be7f91afa87b7edd0d67a -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PresentationObjects/WaveConditionsInputContext.cs (.../WaveConditionsInputContext.cs) (revision 0ee0d86b58275264171be7f91afa87b7edd0d67a)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PresentationObjects/WaveConditionsInputContext.cs (.../WaveConditionsInputContext.cs) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -22,7 +22,6 @@
using System;
using System.Collections.Generic;
using Core.Common.Controls.PresentationObjects;
-using Ringtoets.Common.Data.Calculation;
using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Data.Hydraulics;
using Ringtoets.Revetment.Data;
@@ -40,7 +39,7 @@
/// The wrapped .
/// The calculation having as input.
/// Thrown when any input argument is null.
- protected WaveConditionsInputContext(WaveConditionsInput wrappedData, ICalculation calculation)
+ protected WaveConditionsInputContext(WaveConditionsInput wrappedData, IWaveConditionsCalculation calculation)
: base(wrappedData)
{
if (calculation == null)
@@ -53,7 +52,7 @@
///
/// Gets the calculation containing the wrapped .
///
- public ICalculation Calculation { get; private set; }
+ public IWaveConditionsCalculation Calculation { get; private set; }
///
/// Gets the hydraulic boundary locations.
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj
===================================================================
diff -u -r62ed6462b31529a87c231f131195aef6efa6e3a7 -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj (.../Ringtoets.Revetment.Forms.csproj) (revision 62ed6462b31529a87c231f131195aef6efa6e3a7)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj (.../Ringtoets.Revetment.Forms.csproj) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -34,7 +34,6 @@
-
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil.Test/Ringtoets.Revetment.Data.TestUtil.Test.csproj
===================================================================
diff -u -r6a5d7b40b7ba4dcb73e393075338352d194e97c2 -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil.Test/Ringtoets.Revetment.Data.TestUtil.Test.csproj (.../Ringtoets.Revetment.Data.TestUtil.Test.csproj) (revision 6a5d7b40b7ba4dcb73e393075338352d194e97c2)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil.Test/Ringtoets.Revetment.Data.TestUtil.Test.csproj (.../Ringtoets.Revetment.Data.TestUtil.Test.csproj) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -50,6 +50,7 @@
Properties\GlobalAssembly.cs
+
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil.Test/TestWaveConditionsCalculationTest.cs
===================================================================
diff -u
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil.Test/TestWaveConditionsCalculationTest.cs (revision 0)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil.Test/TestWaveConditionsCalculationTest.cs (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -0,0 +1,45 @@
+// 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 Core.Common.Base;
+using NUnit.Framework;
+using Ringtoets.Common.Data.Calculation;
+
+namespace Ringtoets.Revetment.TestUtil.Test
+{
+ [TestFixture]
+ public class TestWaveConditionsCalculationTest
+ {
+ [Test]
+ public void DefaultConstructor_PropertiesSet()
+ {
+ // Call
+ var calculation = new TestWaveConditionsCalculation();
+
+ // Assert
+ Assert.IsInstanceOf(calculation);
+ Assert.IsInstanceOf(calculation);
+ Assert.IsNull(calculation.Output);
+ Assert.IsFalse(calculation.HasOutput);
+ Assert.IsNull(calculation.InputParameters);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil/Ringtoets.Revetment.Data.TestUtil.csproj
===================================================================
diff -u -r23d1e296e2da4364fbfe346e68d582dfcf966bb0 -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil/Ringtoets.Revetment.Data.TestUtil.csproj (.../Ringtoets.Revetment.Data.TestUtil.csproj) (revision 23d1e296e2da4364fbfe346e68d582dfcf966bb0)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil/Ringtoets.Revetment.Data.TestUtil.csproj (.../Ringtoets.Revetment.Data.TestUtil.csproj) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -46,6 +46,7 @@
Properties\GlobalAssembly.cs
+
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil/TestWaveConditionsCalculation.cs
===================================================================
diff -u
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil/TestWaveConditionsCalculation.cs (revision 0)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Data.TestUtil/TestWaveConditionsCalculation.cs (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -0,0 +1,61 @@
+// 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 Core.Common.Base;
+using Ringtoets.Common.Data;
+using Ringtoets.Revetment.Data;
+
+namespace Ringtoets.Revetment.TestUtil
+{
+ ///
+ /// Creates a simple implementation, which
+ /// can have an object set as output.
+ ///
+ public class TestWaveConditionsCalculation : Observable, IWaveConditionsCalculation
+ {
+ ///
+ /// Gets or sets an object that represents some output of this calculation.
+ ///
+ public object Output { get; set; }
+
+ public WaveConditionsInput InputParameters { get; }
+
+ public bool HasOutput
+ {
+ get
+ {
+ return Output != null;
+ }
+ }
+
+ public void ClearOutput()
+ {
+ Output = null;
+ }
+
+ #region Irrelevant for test
+
+ public string Name { get; set; }
+ public Comment Comments { get; }
+
+ #endregion
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PresentationObjects/WaveConditionsInputContextTest.cs
===================================================================
diff -u -r0ee0d86b58275264171be7f91afa87b7edd0d67a -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PresentationObjects/WaveConditionsInputContextTest.cs (.../WaveConditionsInputContextTest.cs) (revision 0ee0d86b58275264171be7f91afa87b7edd0d67a)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PresentationObjects/WaveConditionsInputContextTest.cs (.../WaveConditionsInputContextTest.cs) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -25,9 +25,9 @@
using NUnit.Framework;
using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Data.Hydraulics;
-using Ringtoets.Common.Forms.TestUtil;
using Ringtoets.Revetment.Data;
using Ringtoets.Revetment.Forms.PresentationObjects;
+using Ringtoets.Revetment.TestUtil;
namespace Ringtoets.Revetment.Forms.Test.PresentationObjects
{
@@ -62,7 +62,7 @@
private class TestWaveConditionsInputContext : WaveConditionsInputContext
{
- public TestWaveConditionsInputContext(WaveConditionsInput wrappedData) : base(wrappedData, new TestCalculation()) {}
+ public TestWaveConditionsInputContext(WaveConditionsInput wrappedData) : base(wrappedData, new TestWaveConditionsCalculation()) {}
public override IEnumerable HydraulicBoundaryLocations
{
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs
===================================================================
diff -u -r0ee0d86b58275264171be7f91afa87b7edd0d67a -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision 0ee0d86b58275264171be7f91afa87b7edd0d67a)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -32,7 +32,6 @@
using Core.Common.Utils;
using NUnit.Framework;
using Rhino.Mocks;
-using Ringtoets.Common.Data.Calculation;
using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Data.Hydraulics;
using Ringtoets.Common.Data.TestUtil;
@@ -43,7 +42,7 @@
using Ringtoets.Revetment.Data;
using Ringtoets.Revetment.Forms.PresentationObjects;
using Ringtoets.Revetment.Forms.PropertyClasses;
-using TestCalculation = Ringtoets.Common.Forms.TestUtil.TestCalculation;
+using Ringtoets.Revetment.TestUtil;
namespace Ringtoets.Revetment.Forms.Test.PropertyClasses
{
@@ -593,7 +592,7 @@
ForeshoreProfile = new TestForeshoreProfile(string.Empty)
};
- var calculation = new TestCalculation();
+ var calculation = new TestWaveConditionsCalculation();
var inputContext = new TestWaveConditionsInputContext(input, calculation, new ForeshoreProfile[0], locations);
var otherProfile = new TestForeshoreProfile(new Point2D(0, 190));
@@ -649,7 +648,7 @@
observable.Expect(o => o.NotifyObservers());
mocks.ReplayAll();
- var calculation = new TestCalculation();
+ var calculation = new TestWaveConditionsCalculation();
var input = new WaveConditionsInput();
input.ForeshoreProfile = new TestForeshoreProfile();
@@ -678,10 +677,10 @@
public TestWaveConditionsInputContext(WaveConditionsInput wrappedData,
IEnumerable foreshoreProfiles,
IEnumerable locations)
- : this(wrappedData, new TestCalculation(), foreshoreProfiles, locations) {}
+ : this(wrappedData, new TestWaveConditionsCalculation(), foreshoreProfiles, locations) {}
public TestWaveConditionsInputContext(WaveConditionsInput wrappedData,
- ICalculation calculation,
+ IWaveConditionsCalculation calculation,
IEnumerable foreshoreProfiles,
IEnumerable locations)
: base(wrappedData, calculation)
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Ringtoets.Revetment.Forms.Test.csproj
===================================================================
diff -u -r62ed6462b31529a87c231f131195aef6efa6e3a7 -rec15ff35b39f333c422b8ca6988c34bd8573f134
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Ringtoets.Revetment.Forms.Test.csproj (.../Ringtoets.Revetment.Forms.Test.csproj) (revision 62ed6462b31529a87c231f131195aef6efa6e3a7)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Ringtoets.Revetment.Forms.Test.csproj (.../Ringtoets.Revetment.Forms.Test.csproj) (revision ec15ff35b39f333c422b8ca6988c34bd8573f134)
@@ -125,6 +125,10 @@
Ringtoets.Revetment.FormsTrue
+
+ {3706200E-48C6-4B86-B48C-4E45C69ABE95}
+ Ringtoets.Revetment.Data.TestUtil
+