Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs
===================================================================
diff -u -rb8100349604f5c6e5055804e5777323b4a4e106f -r6b3ad06df3252c2b4af8b9c755c832a723d8e18f
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs) (revision b8100349604f5c6e5055804e5777323b4a4e106f)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs) (revision 6b3ad06df3252c2b4af8b9c755c832a723d8e18f)
@@ -47,20 +47,14 @@
///
/// Creates a new instance of .
///
- /// The locations to show in the view.
/// The failure mechanism that the locations belong to.
/// The assessment section that the locations belong to.
- /// Thrown when any input parameter is null.
- public GrassCoverErosionOutwardsDesignWaterLevelLocationsView(ObservableList locations,
- GrassCoverErosionOutwardsFailureMechanism failureMechanism,
+ /// Thrown when or
+ /// is null.
+ public GrassCoverErosionOutwardsDesignWaterLevelLocationsView(GrassCoverErosionOutwardsFailureMechanism failureMechanism,
IAssessmentSection assessmentSection)
- : base(locations, assessmentSection)
+ : base(failureMechanism?.HydraulicBoundaryLocations, assessmentSection)
{
- if (failureMechanism == null)
- {
- throw new ArgumentNullException(nameof(failureMechanism));
- }
-
FailureMechanism = failureMechanism;
messageProvider = new GrassCoverErosionOutwardsDesignWaterLevelCalculationMessageProvider();
@@ -116,7 +110,7 @@
protected override string ValidateCalculatableObjects()
{
- return FailureMechanism == null || FailureMechanism.Contribution <= 0
+ return FailureMechanism != null && FailureMechanism.Contribution <= 0
? RingtoetsCommonFormsResources.Contribution_of_failure_mechanism_zero
: base.ValidateCalculatableObjects();
}
Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsWaveHeightLocationsView.cs
===================================================================
diff -u -rb8100349604f5c6e5055804e5777323b4a4e106f -r6b3ad06df3252c2b4af8b9c755c832a723d8e18f
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsWaveHeightLocationsView.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsView.cs) (revision b8100349604f5c6e5055804e5777323b4a4e106f)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsWaveHeightLocationsView.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsView.cs) (revision 6b3ad06df3252c2b4af8b9c755c832a723d8e18f)
@@ -47,20 +47,14 @@
///
/// Creates a new instance of .
///
- /// The locations to show in the view.
/// The failure mechanism that the locations belong to.
/// The assessment section that the locations belong to.
- /// Thrown when any input parameter is null.
- public GrassCoverErosionOutwardsWaveHeightLocationsView(ObservableList locations,
- GrassCoverErosionOutwardsFailureMechanism failureMechanism,
+ /// Thrown when or
+ /// is null.
+ public GrassCoverErosionOutwardsWaveHeightLocationsView(GrassCoverErosionOutwardsFailureMechanism failureMechanism,
IAssessmentSection assessmentSection)
- : base(locations, assessmentSection)
+ : base(failureMechanism?.HydraulicBoundaryLocations, assessmentSection)
{
- if (failureMechanism == null)
- {
- throw new ArgumentNullException(nameof(failureMechanism));
- }
-
FailureMechanism = failureMechanism;
messageProvider = new GrassCoverErosionOutwardsWaveHeightCalculationMessageProvider();
@@ -118,7 +112,7 @@
protected override string ValidateCalculatableObjects()
{
- return FailureMechanism == null || FailureMechanism.Contribution <= 0
+ return FailureMechanism != null && FailureMechanism.Contribution <= 0
? RingtoetsCommonFormsResources.Contribution_of_failure_mechanism_zero
: base.ValidateCalculatableObjects();
}
Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs
===================================================================
diff -u -r7fdca38fd807e6f360289fd5cf7fb29ff11e897e -r6b3ad06df3252c2b4af8b9c755c832a723d8e18f
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 7fdca38fd807e6f360289fd5cf7fb29ff11e897e)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 6b3ad06df3252c2b4af8b9c755c832a723d8e18f)
@@ -141,9 +141,7 @@
GetViewName = (view, locations) => RingtoetsGrassCoverErosionOutwardsFormsResources.GrassCoverErosionOutwardsWaterLevelLocations_DisplayName,
GetViewData = context => context.WrappedData,
Image = RingtoetsCommonFormsResources.GenericInputOutputIcon,
- CreateInstance = context => new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(context.WrappedData,
- context.FailureMechanism,
- context.AssessmentSection),
+ CreateInstance = context => new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(context.FailureMechanism, context.AssessmentSection),
AfterCreate = (view, context) =>
{
view.CalculationGuiService = hydraulicBoundaryLocationCalculationGuiService;
@@ -158,15 +156,13 @@
{
GetViewName = (view, locations) => RingtoetsGrassCoverErosionOutwardsFormsResources.GrassCoverErosionOutwardsWaveHeightLocationsContext_DisplayName,
GetViewData = context => context.WrappedData,
+ CloseForData = CloseGrassCoverErosionOutwardsLocationsViewForData,
Image = RingtoetsCommonFormsResources.GenericInputOutputIcon,
- CreateInstance = context => new GrassCoverErosionOutwardsWaveHeightLocationsView(context.WrappedData,
- context.FailureMechanism,
- context.AssessmentSection),
+ CreateInstance = context => new GrassCoverErosionOutwardsWaveHeightLocationsView(context.FailureMechanism, context.AssessmentSection),
AfterCreate = (view, context) =>
{
view.CalculationGuiService = hydraulicBoundaryLocationCalculationGuiService;
- },
- CloseForData = CloseGrassCoverErosionOutwardsLocationsViewForData
+ }
};
}
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs
===================================================================
diff -u -r6327fbda663d5d8ab7ec1c364d558361a22c014d -r6b3ad06df3252c2b4af8b9c755c832a723d8e18f
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 6327fbda663d5d8ab7ec1c364d558361a22c014d)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewTest.cs) (revision 6b3ad06df3252c2b4af8b9c755c832a723d8e18f)
@@ -84,8 +84,7 @@
mockRepository.ReplayAll();
// Call
- using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(new ObservableList(),
- new GrassCoverErosionOutwardsFailureMechanism(),
+ using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(new GrassCoverErosionOutwardsFailureMechanism(),
assessmentSection))
{
// Assert
@@ -102,13 +101,11 @@
mockRepository.ReplayAll();
// Call
- TestDelegate call = () => new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(new ObservableList(),
- null,
- assessmentSection);
+ TestDelegate call = () => new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(null, assessmentSection);
// Assert
var exception = Assert.Throws(call);
- Assert.AreEqual("failureMechanism", exception.ParamName);
+ Assert.AreEqual("locations", exception.ParamName);
}
[Test]
@@ -622,10 +619,9 @@
{
Contribution = 10
};
+ failureMechanism.HydraulicBoundaryLocations.AddRange(locations);
- var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(locations,
- failureMechanism,
- assessmentSection);
+ var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(failureMechanism, assessmentSection);
form.Controls.Add(view);
form.Show();
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs
===================================================================
diff -u -r6327fbda663d5d8ab7ec1c364d558361a22c014d -r6b3ad06df3252c2b4af8b9c755c832a723d8e18f
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 6327fbda663d5d8ab7ec1c364d558361a22c014d)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewTest.cs) (revision 6b3ad06df3252c2b4af8b9c755c832a723d8e18f)
@@ -84,8 +84,7 @@
mockRepository.ReplayAll();
// Call
- using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(new ObservableList(),
- new GrassCoverErosionOutwardsFailureMechanism(),
+ using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(new GrassCoverErosionOutwardsFailureMechanism(),
assessmentSection))
{
// Assert
@@ -102,13 +101,11 @@
mockRepository.ReplayAll();
// Call
- TestDelegate call = () => new GrassCoverErosionOutwardsWaveHeightLocationsView(new ObservableList(),
- null,
- assessmentSection);
+ TestDelegate call = () => new GrassCoverErosionOutwardsWaveHeightLocationsView(null, assessmentSection);
// Assert
var exception = Assert.Throws(call);
- Assert.AreEqual("failureMechanism", exception.ParamName);
+ Assert.AreEqual("locations", exception.ParamName);
}
[Test]
@@ -621,10 +618,9 @@
{
Contribution = 10
};
+ failureMechanism.HydraulicBoundaryLocations.AddRange(locations);
- var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(locations,
- failureMechanism,
- assessmentSection);
+ var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(failureMechanism, assessmentSection);
form.Controls.Add(view);
form.Show();
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewIntegrationTest.cs
===================================================================
diff -u -r7769820ef9923955f246f81c6ea320f92c3d65bb -r6b3ad06df3252c2b4af8b9c755c832a723d8e18f
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewIntegrationTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewIntegrationTest.cs) (revision 7769820ef9923955f246f81c6ea320f92c3d65bb)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewIntegrationTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewIntegrationTest.cs) (revision 6b3ad06df3252c2b4af8b9c755c832a723d8e18f)
@@ -21,7 +21,6 @@
using System.Linq;
using System.Windows.Forms;
-using Core.Common.Base;
using Core.Common.Util.Reflection;
using NUnit.Framework;
using Rhino.Mocks;
@@ -103,8 +102,7 @@
{
Contribution = 5
};
-
- var locations = new ObservableList
+ failureMechanism.HydraulicBoundaryLocations.AddRange(new[]
{
new HydraulicBoundaryLocation(1, "1", 1.0, 1.0),
new HydraulicBoundaryLocation(2, "2", 2.0, 2.0)
@@ -121,10 +119,9 @@
Output = new TestHydraulicBoundaryLocationOutput(2.45)
}
}
- };
+ });
- var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(locations,
- failureMechanism,
+ var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(failureMechanism,
new AssessmentSection(AssessmentSectionComposition.Dike));
testForm.Controls.Add(view);
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsWaveHeightLocationsViewIntegrationTest.cs
===================================================================
diff -u -r7769820ef9923955f246f81c6ea320f92c3d65bb -r6b3ad06df3252c2b4af8b9c755c832a723d8e18f
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsWaveHeightLocationsViewIntegrationTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewIntegrationTest.cs) (revision 7769820ef9923955f246f81c6ea320f92c3d65bb)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Integration.Test/GrassCoverErosionOutwardsWaveHeightLocationsViewIntegrationTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewIntegrationTest.cs) (revision 6b3ad06df3252c2b4af8b9c755c832a723d8e18f)
@@ -21,7 +21,6 @@
using System.Linq;
using System.Windows.Forms;
-using Core.Common.Base;
using Core.Common.Util.Reflection;
using NUnit.Framework;
using Rhino.Mocks;
@@ -103,8 +102,7 @@
{
Contribution = 5
};
-
- var locations = new ObservableList
+ failureMechanism.HydraulicBoundaryLocations.AddRange(new[]
{
new HydraulicBoundaryLocation(1, "1", 1.0, 1.0),
new HydraulicBoundaryLocation(2, "2", 2.0, 2.0)
@@ -121,10 +119,9 @@
Output = new TestHydraulicBoundaryLocationOutput(2.45)
}
}
- };
+ });
- var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(locations,
- failureMechanism,
+ var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(failureMechanism,
new AssessmentSection(AssessmentSectionComposition.Dike));
testForm.Controls.Add(view);
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ViewInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewInfoTest.cs
===================================================================
diff -u -rb8100349604f5c6e5055804e5777323b4a4e106f -r6b3ad06df3252c2b4af8b9c755c832a723d8e18f
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ViewInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewInfoTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewInfoTest.cs) (revision b8100349604f5c6e5055804e5777323b4a4e106f)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ViewInfos/GrassCoverErosionOutwardsDesignWaterLevelLocationsViewInfoTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsViewInfoTest.cs) (revision 6b3ad06df3252c2b4af8b9c755c832a723d8e18f)
@@ -136,19 +136,16 @@
ViewInfo info = GetInfo(plugin);
var grassCoverErosionOutwardsFailureMechanism = new GrassCoverErosionOutwardsFailureMechanism();
- var hydraulicBoundaryLocations = new ObservableList();
var data = new GrassCoverErosionOutwardsDesignWaterLevelLocationsContext(
- hydraulicBoundaryLocations,
+ new ObservableList(),
assessmentSection,
grassCoverErosionOutwardsFailureMechanism);
plugin.Gui = gui;
plugin.Activate();
- using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(hydraulicBoundaryLocations,
- grassCoverErosionOutwardsFailureMechanism,
- assessmentSection))
+ using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(grassCoverErosionOutwardsFailureMechanism, assessmentSection))
{
// Call
info.AfterCreate(view, data);
@@ -165,7 +162,6 @@
public void CloseViewForData_ForMatchingAssessmentSection_ReturnsTrue()
{
// Setup
- var locations = new ObservableList();
var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism();
var mocks = new MockRepository();
@@ -178,9 +174,7 @@
assessmentSection.Stub(a => a.Detach(null)).IgnoreArguments();
mocks.ReplayAll();
- using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(locations,
- failureMechanism,
- assessmentSection))
+ using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(failureMechanism, assessmentSection))
using (var plugin = new GrassCoverErosionOutwardsPlugin())
{
ViewInfo info = GetInfo(plugin);
@@ -198,7 +192,6 @@
public void CloseViewForData_ForNonMatchingAssessmentSection_ReturnsFalse()
{
// Setup
- var locations = new ObservableList();
var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism();
var mocks = new MockRepository();
@@ -216,9 +209,7 @@
});
mocks.ReplayAll();
- using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(locations,
- failureMechanism,
- assessmentSectionA))
+ using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(failureMechanism, assessmentSectionA))
using (var plugin = new GrassCoverErosionOutwardsPlugin())
{
ViewInfo info = GetInfo(plugin);
@@ -250,8 +241,7 @@
new GrassCoverErosionOutwardsFailureMechanism(),
assessmentSection);
- using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(new ObservableList(),
- new GrassCoverErosionOutwardsFailureMechanism(),
+ using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(new GrassCoverErosionOutwardsFailureMechanism(),
assessmentSection))
using (var plugin = new GrassCoverErosionOutwardsPlugin())
{
@@ -289,9 +279,7 @@
new GrassCoverErosionOutwardsFailureMechanism(),
assessmentSectionB);
- using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(new ObservableList(),
- new GrassCoverErosionOutwardsFailureMechanism(),
- assessmentSectionA))
+ using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(new GrassCoverErosionOutwardsFailureMechanism(), assessmentSectionA))
using (var plugin = new GrassCoverErosionOutwardsPlugin())
{
ViewInfo info = GetInfo(plugin);
@@ -319,9 +307,7 @@
assessmentSection.Stub(a => a.Detach(null)).IgnoreArguments();
mocks.ReplayAll();
- using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(new ObservableList(),
- new GrassCoverErosionOutwardsFailureMechanism(),
- assessmentSection))
+ using (var view = new GrassCoverErosionOutwardsDesignWaterLevelLocationsView(new GrassCoverErosionOutwardsFailureMechanism(), assessmentSection))
using (var plugin = new GrassCoverErosionOutwardsPlugin())
{
ViewInfo info = GetInfo(plugin);
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ViewInfos/GrassCoverErosionOutwardsWaveHeightLocationsViewInfoTest.cs
===================================================================
diff -u -rb8100349604f5c6e5055804e5777323b4a4e106f -r6b3ad06df3252c2b4af8b9c755c832a723d8e18f
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ViewInfos/GrassCoverErosionOutwardsWaveHeightLocationsViewInfoTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewInfoTest.cs) (revision b8100349604f5c6e5055804e5777323b4a4e106f)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ViewInfos/GrassCoverErosionOutwardsWaveHeightLocationsViewInfoTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsViewInfoTest.cs) (revision 6b3ad06df3252c2b4af8b9c755c832a723d8e18f)
@@ -135,18 +135,14 @@
ViewInfo info = GetInfo(plugin);
var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism();
- var hydraulicBoundaryLocations = new ObservableList();
-
var data = new GrassCoverErosionOutwardsWaveHeightLocationsContext(
- hydraulicBoundaryLocations,
+ new ObservableList(),
assessmentSection,
failureMechanism);
plugin.Gui = gui;
plugin.Activate();
- using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(hydraulicBoundaryLocations,
- failureMechanism,
- assessmentSection))
+ using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(failureMechanism, assessmentSection))
{
info.AfterCreate(view, data);
@@ -162,7 +158,6 @@
public void CloseViewForData_ForMatchingAssessmentSection_ReturnsTrue()
{
// Setup
- var locations = new ObservableList();
var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism();
var mocks = new MockRepository();
@@ -175,9 +170,7 @@
assessmentSection.Stub(a => a.Detach(null)).IgnoreArguments();
mocks.ReplayAll();
- using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(locations,
- failureMechanism,
- assessmentSection))
+ using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(failureMechanism, assessmentSection))
using (var plugin = new GrassCoverErosionOutwardsPlugin())
{
ViewInfo info = GetInfo(plugin);
@@ -195,7 +188,6 @@
public void CloseViewForData_ForNonMatchingAssessmentSection_ReturnsFalse()
{
// Setup
- var locations = new ObservableList();
var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism();
var mocks = new MockRepository();
@@ -213,9 +205,7 @@
});
mocks.ReplayAll();
- using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(locations,
- failureMechanism,
- assessmentSectionA))
+ using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(failureMechanism, assessmentSectionA))
using (var plugin = new GrassCoverErosionOutwardsPlugin())
{
ViewInfo info = GetInfo(plugin);
@@ -247,8 +237,7 @@
new GrassCoverErosionOutwardsFailureMechanism(),
assessmentSection);
- using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(new ObservableList(),
- new GrassCoverErosionOutwardsFailureMechanism(),
+ using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(new GrassCoverErosionOutwardsFailureMechanism(),
assessmentSection))
using (var plugin = new GrassCoverErosionOutwardsPlugin())
{
@@ -286,9 +275,7 @@
new GrassCoverErosionOutwardsFailureMechanism(),
assessmentSectionB);
- using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(new ObservableList(),
- new GrassCoverErosionOutwardsFailureMechanism(),
- assessmentSectionA))
+ using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(new GrassCoverErosionOutwardsFailureMechanism(), assessmentSectionA))
using (var plugin = new GrassCoverErosionOutwardsPlugin())
{
ViewInfo info = GetInfo(plugin);
@@ -316,9 +303,7 @@
assessmentSection.Stub(a => a.Detach(null)).IgnoreArguments();
mocks.ReplayAll();
- using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(new ObservableList(),
- new GrassCoverErosionOutwardsFailureMechanism(),
- assessmentSection))
+ using (var view = new GrassCoverErosionOutwardsWaveHeightLocationsView(new GrassCoverErosionOutwardsFailureMechanism(), assessmentSection))
using (var plugin = new GrassCoverErosionOutwardsPlugin())
{
ViewInfo info = GetInfo(plugin);