Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PresentationObjects/DuneLocationCalculationsContext.cs =================================================================== diff -u --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PresentationObjects/DuneLocationCalculationsContext.cs (revision 0) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PresentationObjects/DuneLocationCalculationsContext.cs (revision 71fda574a476b830bd4b767b624fb52426658701) @@ -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 Core.Common.Base; +using Core.Common.Controls.PresentationObjects; +using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.DuneErosion.Data; + +namespace Ringtoets.DuneErosion.Forms.PresentationObjects +{ + /// + /// Presentation object for dune location calculations. + /// + public class DuneLocationCalculationsContext : ObservableWrappedObjectContextBase> + { + /// + /// Creates a new instance of . + /// + /// The dune locations for dune erosion failure mechanism. + /// The dune erosion failure mechanism which the calculations belong to. + /// The assessment section the calculations belong to. + /// Thrown when any input argument is null. + public DuneLocationCalculationsContext(IObservableEnumerable duneLocations, + DuneErosionFailureMechanism failureMechanism, + IAssessmentSection assessmentSection) + : base(duneLocations) + { + if (failureMechanism == null) + { + throw new ArgumentNullException(nameof(failureMechanism)); + } + + if (assessmentSection == null) + { + throw new ArgumentNullException(nameof(assessmentSection)); + } + + AssessmentSection = assessmentSection; + FailureMechanism = failureMechanism; + } + + /// + /// Gets the assessment section. + /// + public IAssessmentSection AssessmentSection { get; } + + /// + /// Gets the failure mechanism. + /// + public DuneErosionFailureMechanism FailureMechanism { get; } + } +} \ No newline at end of file Fisheye: Tag 71fda574a476b830bd4b767b624fb52426658701 refers to a dead (removed) revision in file `Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PresentationObjects/DuneLocationsContext.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Ringtoets.DuneErosion.Forms.csproj =================================================================== diff -u -r36828a0ba71303efd79ccb1123c8c427b8028b24 -r71fda574a476b830bd4b767b624fb52426658701 --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Ringtoets.DuneErosion.Forms.csproj (.../Ringtoets.DuneErosion.Forms.csproj) (revision 36828a0ba71303efd79ccb1123c8c427b8028b24) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Ringtoets.DuneErosion.Forms.csproj (.../Ringtoets.DuneErosion.Forms.csproj) (revision 71fda574a476b830bd4b767b624fb52426658701) @@ -20,7 +20,7 @@ - + Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Plugin/DuneErosionPlugin.cs =================================================================== diff -u -r73bb4932d13d36d1cd3cd30d8151f2adf49646f2 -r71fda574a476b830bd4b767b624fb52426658701 --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Plugin/DuneErosionPlugin.cs (.../DuneErosionPlugin.cs) (revision 73bb4932d13d36d1cd3cd30d8151f2adf49646f2) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Plugin/DuneErosionPlugin.cs (.../DuneErosionPlugin.cs) (revision 71fda574a476b830bd4b767b624fb52426658701) @@ -61,7 +61,7 @@ CreateInstance = context => new DuneErosionFailureMechanismProperties(context.WrappedData, new DuneErosionFailureMechanismPropertyChangeHandler()) }; - yield return new PropertyInfo + yield return new PropertyInfo { CreateInstance = context => new DuneLocationsProperties(context.WrappedData, l => l.Calculation) }; @@ -89,7 +89,7 @@ .Build() }; - yield return new TreeNodeInfo + yield return new TreeNodeInfo { Text = context => RingtoetsCommonDataResources.HydraulicBoundaryConditions_DisplayName, Image = context => RingtoetsCommonFormsResources.GenericInputOutputIcon, @@ -124,7 +124,7 @@ AdditionalDataCheck = context => context.WrappedData.IsRelevant }; - yield return new ViewInfo, DuneLocationsView> + yield return new ViewInfo, DuneLocationsView> { GetViewName = (view, context) => RingtoetsCommonDataResources.HydraulicBoundaryConditions_DisplayName, Image = RingtoetsCommonFormsResources.GenericInputOutputIcon, @@ -141,7 +141,7 @@ public override IEnumerable GetExportInfos() { - yield return new ExportInfo + yield return new ExportInfo { Name = RingtoetsCommonDataResources.HydraulicBoundaryConditions_DisplayName, CreateFileExporter = (context, filePath) => new DuneLocationsExporter(context.WrappedData, filePath), @@ -174,7 +174,7 @@ return new object[] { new CategoryTreeFolder(RingtoetsCommonFormsResources.FailureMechanism_Inputs_DisplayName, GetInputs(wrappedData, failureMechanismContext.Parent), TreeFolderCategory.Input), - new DuneLocationsContext(wrappedData.DuneLocations, wrappedData, failureMechanismContext.Parent), + new DuneLocationCalculationsContext(wrappedData.DuneLocations, wrappedData, failureMechanismContext.Parent), new CategoryTreeFolder(RingtoetsCommonFormsResources.FailureMechanism_Outputs_DisplayName, GetOutputs(wrappedData), TreeFolderCategory.Output) }; } @@ -262,7 +262,7 @@ return HydraulicBoundaryDatabaseConnectionValidator.Validate(assessmentSection.HydraulicBoundaryDatabase); } - private ContextMenuStrip DuneLocationsContextMenuStrip(DuneLocationsContext context, object parent, TreeViewControl treeViewControl) + private ContextMenuStrip DuneLocationsContextMenuStrip(DuneLocationCalculationsContext context, object parent, TreeViewControl treeViewControl) { var calculateAllItem = new StrictContextMenuItem( RingtoetsCommonFormsResources.Calculate_all, Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PresentationObjects/DuneLocationCalculationsContextTest.cs =================================================================== diff -u --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PresentationObjects/DuneLocationCalculationsContextTest.cs (revision 0) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PresentationObjects/DuneLocationCalculationsContextTest.cs (revision 71fda574a476b830bd4b767b624fb52426658701) @@ -0,0 +1,90 @@ +// 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.DuneErosion.Data; +using Ringtoets.DuneErosion.Forms.PresentationObjects; + +namespace Ringtoets.DuneErosion.Forms.Test.PresentationObjects +{ + [TestFixture] + public class DuneLocationCalculationsContextTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var mockRepository = new MockRepository(); + var assessmentSection = mockRepository.Stub(); + mockRepository.ReplayAll(); + + var failureMechanism = new DuneErosionFailureMechanism(); + var duneLocationCalculations = new ObservableList(); + + // Call + var context = new DuneLocationCalculationsContext(duneLocationCalculations, failureMechanism, assessmentSection); + + // Assert + Assert.IsInstanceOf>>(context); + Assert.AreSame(duneLocationCalculations, context.WrappedData); + Assert.AreSame(failureMechanism, context.FailureMechanism); + Assert.AreSame(assessmentSection, context.AssessmentSection); + mockRepository.VerifyAll(); + } + + [Test] + public void Constructor_FailureMechanismNull_ThrowArgumentNullException() + { + // Setup + var mockRepository = new MockRepository(); + var assessmentSection = mockRepository.Stub(); + mockRepository.ReplayAll(); + + // Call + TestDelegate call = () => new DuneLocationCalculationsContext(new ObservableList(), + null, + assessmentSection); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("failureMechanism", paramName); + mockRepository.VerifyAll(); + } + + [Test] + public void Constructor_AssessmentSectionIsNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new DuneLocationCalculationsContext(new ObservableList(), + new DuneErosionFailureMechanism(), + null); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("assessmentSection", paramName); + } + } +} \ No newline at end of file Fisheye: Tag 71fda574a476b830bd4b767b624fb52426658701 refers to a dead (removed) revision in file `Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PresentationObjects/DuneLocationsContextTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/Ringtoets.DuneErosion.Forms.Test.csproj =================================================================== diff -u -r92c2041d1ffed9391e69c9a3b2c7adc93298b5d8 -r71fda574a476b830bd4b767b624fb52426658701 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/Ringtoets.DuneErosion.Forms.Test.csproj (.../Ringtoets.DuneErosion.Forms.Test.csproj) (revision 92c2041d1ffed9391e69c9a3b2c7adc93298b5d8) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/Ringtoets.DuneErosion.Forms.Test.csproj (.../Ringtoets.DuneErosion.Forms.Test.csproj) (revision 71fda574a476b830bd4b767b624fb52426658701) @@ -27,7 +27,7 @@ - + Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/DuneErosionPluginTest.cs =================================================================== diff -u -r73bb4932d13d36d1cd3cd30d8151f2adf49646f2 -r71fda574a476b830bd4b767b624fb52426658701 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/DuneErosionPluginTest.cs (.../DuneErosionPluginTest.cs) (revision 73bb4932d13d36d1cd3cd30d8151f2adf49646f2) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/DuneErosionPluginTest.cs (.../DuneErosionPluginTest.cs) (revision 71fda574a476b830bd4b767b624fb52426658701) @@ -82,7 +82,7 @@ typeof(DuneErosionFailureMechanismProperties)); PluginTestHelper.AssertPropertyInfoDefined( propertyInfos, - typeof(DuneLocationsContext), + typeof(DuneLocationCalculationsContext), typeof(DuneLocationsProperties)); PluginTestHelper.AssertPropertyInfoDefined( propertyInfos, @@ -104,7 +104,7 @@ Assert.AreEqual(3, treeNodeInfos.Length); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(DuneErosionFailureMechanismContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext))); - Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(DuneLocationsContext))); + Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(DuneLocationCalculationsContext))); } } @@ -133,7 +133,7 @@ PluginTestHelper.AssertViewInfoDefined( viewInfos, - typeof(DuneLocationsContext), + typeof(DuneLocationCalculationsContext), typeof(IEnumerable), typeof(DuneLocationsView)); } @@ -150,7 +150,7 @@ // Assert Assert.AreEqual(1, exportInfos.Length); - Assert.IsTrue(exportInfos.Any(ei => ei.DataType == typeof(DuneLocationsContext))); + Assert.IsTrue(exportInfos.Any(ei => ei.DataType == typeof(DuneLocationCalculationsContext))); } } } Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/ExportInfos/DuneLocationsContextExportInfoTest.cs =================================================================== diff -u -rb0e228408016f88b94ac63d6896e5bc7668a75c1 -r71fda574a476b830bd4b767b624fb52426658701 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/ExportInfos/DuneLocationsContextExportInfoTest.cs (.../DuneLocationsContextExportInfoTest.cs) (revision b0e228408016f88b94ac63d6896e5bc7668a75c1) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/ExportInfos/DuneLocationsContextExportInfoTest.cs (.../DuneLocationsContextExportInfoTest.cs) (revision 71fda574a476b830bd4b767b624fb52426658701) @@ -66,7 +66,7 @@ mocks.ReplayAll(); var failureMechanism = new DuneErosionFailureMechanism(); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); using (var plugin = new DuneErosionPlugin()) { @@ -107,7 +107,7 @@ var failureMechanism = new DuneErosionFailureMechanism(); failureMechanism.DuneLocations.Add(new TestDuneLocation()); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); using (var plugin = new DuneErosionPlugin()) { @@ -138,7 +138,7 @@ Output = new TestDuneLocationOutput() } }); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); using (var plugin = new DuneErosionPlugin()) { @@ -155,7 +155,7 @@ private static ExportInfo GetExportInfo(DuneErosionPlugin plugin) { - return plugin.GetExportInfos().First(ei => ei.DataType == typeof(DuneLocationsContext)); + return plugin.GetExportInfos().First(ei => ei.DataType == typeof(DuneLocationCalculationsContext)); } } } \ No newline at end of file Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/PropertyInfos/DuneLocationsContextPropertyInfoTest.cs =================================================================== diff -u -ra5bf4f56dbf07e5cf48d0b874f5d46d7d02f0dba -r71fda574a476b830bd4b767b624fb52426658701 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/PropertyInfos/DuneLocationsContextPropertyInfoTest.cs (.../DuneLocationsContextPropertyInfoTest.cs) (revision a5bf4f56dbf07e5cf48d0b874f5d46d7d02f0dba) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/PropertyInfos/DuneLocationsContextPropertyInfoTest.cs (.../DuneLocationsContextPropertyInfoTest.cs) (revision 71fda574a476b830bd4b767b624fb52426658701) @@ -44,7 +44,7 @@ PropertyInfo info = GetInfo(plugin); // Assert - Assert.AreEqual(typeof(DuneLocationsContext), info.DataType); + Assert.AreEqual(typeof(DuneLocationCalculationsContext), info.DataType); Assert.AreEqual(typeof(DuneLocationsProperties), info.PropertyObjectType); } } @@ -58,7 +58,7 @@ mockRepository.ReplayAll(); var failureMechanism = new DuneErosionFailureMechanism(); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); using (var plugin = new DuneErosionPlugin()) @@ -77,7 +77,7 @@ private static PropertyInfo GetInfo(DuneErosionPlugin plugin) { - return plugin.GetPropertyInfos().First(pi => pi.DataType == typeof(DuneLocationsContext)); + return plugin.GetPropertyInfos().First(pi => pi.DataType == typeof(DuneLocationCalculationsContext)); } } } \ No newline at end of file Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneErosionFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r6e4bf216d76f52ad3159a6cf1ab3ea38c2f17f28 -r71fda574a476b830bd4b767b624fb52426658701 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneErosionFailureMechanismContextTreeNodeInfoTest.cs (.../DuneErosionFailureMechanismContextTreeNodeInfoTest.cs) (revision 6e4bf216d76f52ad3159a6cf1ab3ea38c2f17f28) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneErosionFailureMechanismContextTreeNodeInfoTest.cs (.../DuneErosionFailureMechanismContextTreeNodeInfoTest.cs) (revision 71fda574a476b830bd4b767b624fb52426658701) @@ -119,7 +119,7 @@ var inputComment = (Comment) inputsFolder.Contents.ElementAt(1); Assert.AreSame(failureMechanism.InputComments, inputComment); - var hydraulicBoundaryLocationsContext = (DuneLocationsContext) children[1]; + var hydraulicBoundaryLocationsContext = (DuneLocationCalculationsContext) children[1]; Assert.AreSame(failureMechanism.DuneLocations, hydraulicBoundaryLocationsContext.WrappedData); Assert.AreSame(failureMechanism, hydraulicBoundaryLocationsContext.FailureMechanism); Assert.AreSame(assessmentSection, hydraulicBoundaryLocationsContext.AssessmentSection); Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationsContextTreeNodeInfoTest.cs =================================================================== diff -u -r0e9106c398cfaca6173cb4a63d65d664d6da5ae2 -r71fda574a476b830bd4b767b624fb52426658701 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationsContextTreeNodeInfoTest.cs (.../DuneLocationsContextTreeNodeInfoTest.cs) (revision 0e9106c398cfaca6173cb4a63d65d664d6da5ae2) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/TreeNodeInfos/DuneLocationsContextTreeNodeInfoTest.cs (.../DuneLocationsContextTreeNodeInfoTest.cs) (revision 71fda574a476b830bd4b767b624fb52426658701) @@ -66,7 +66,7 @@ { mocks = new MockRepository(); plugin = new DuneErosionPlugin(); - info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(DuneLocationsContext)); + info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(DuneLocationCalculationsContext)); } [TearDown] @@ -112,7 +112,7 @@ mocks.ReplayAll(); var mechanism = new DuneErosionFailureMechanism(); - var context = new DuneLocationsContext(mechanism.DuneLocations, mechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(mechanism.DuneLocations, mechanism, assessmentSection); // Call string text = info.Text(context); @@ -142,7 +142,7 @@ mocks.ReplayAll(); var mechanism = new DuneErosionFailureMechanism(); - var context = new DuneLocationsContext(mechanism.DuneLocations, mechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(mechanism.DuneLocations, mechanism, assessmentSection); // Call Color textColor = info.ForeColor(context); @@ -160,7 +160,7 @@ var mechanism = new DuneErosionFailureMechanism(); mechanism.DuneLocations.Add(new TestDuneLocation()); - var context = new DuneLocationsContext(mechanism.DuneLocations, mechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(mechanism.DuneLocations, mechanism, assessmentSection); // Call Color textColor = info.ForeColor(context); @@ -177,7 +177,7 @@ { var assessmentSection = mocks.Stub(); var failureMechanism = new DuneErosionFailureMechanism(); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); var menuBuilder = mocks.StrictMock(); using (mocks.Ordered()) @@ -221,7 +221,7 @@ }; var builder = new CustomItemsOnlyContextMenuBuilder(); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); var gui = mocks.Stub(); gui.Stub(cmp => cmp.Get(context, treeViewControl)).Return(builder); @@ -268,7 +268,7 @@ }; var builder = new CustomItemsOnlyContextMenuBuilder(); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); var gui = mocks.Stub(); gui.Stub(cmp => cmp.Get(context, treeViewControl)).Return(builder); @@ -309,7 +309,7 @@ var failureMechanism = new DuneErosionFailureMechanism(); var builder = new CustomItemsOnlyContextMenuBuilder(); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); var gui = mocks.Stub(); gui.Stub(cmp => cmp.Get(context, treeViewControl)).Return(builder); @@ -355,7 +355,7 @@ }; var builder = new CustomItemsOnlyContextMenuBuilder(); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); var gui = mocks.Stub(); gui.Stub(cmp => cmp.Get(context, treeViewControl)).Return(builder); @@ -425,7 +425,7 @@ failureMechanism })); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); var builder = new CustomItemsOnlyContextMenuBuilder(); @@ -524,7 +524,7 @@ failureMechanism })); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -602,7 +602,7 @@ failureMechanism })); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { @@ -679,7 +679,7 @@ failureMechanism })); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); using (var treeViewControl = new TreeViewControl()) { Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/ViewInfos/DuneLocationsViewInfoTest.cs =================================================================== diff -u -rc743d1f229ff553fff9a05964c1adac6e510df4a -r71fda574a476b830bd4b767b624fb52426658701 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/ViewInfos/DuneLocationsViewInfoTest.cs (.../DuneLocationsViewInfoTest.cs) (revision c743d1f229ff553fff9a05964c1adac6e510df4a) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Plugin.Test/ViewInfos/DuneLocationsViewInfoTest.cs (.../DuneLocationsViewInfoTest.cs) (revision 71fda574a476b830bd4b767b624fb52426658701) @@ -86,7 +86,7 @@ Type dataType = info.DataType; // Assert - Assert.AreEqual(typeof(DuneLocationsContext), dataType); + Assert.AreEqual(typeof(DuneLocationCalculationsContext), dataType); } [Test] @@ -109,7 +109,7 @@ var failureMechanism = new DuneErosionFailureMechanism(); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); // Call object viewData = info.GetViewData(context); @@ -129,7 +129,7 @@ var failureMechanism = new DuneErosionFailureMechanism(); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); // Call bool additionalDataCheck = info.AdditionalDataCheck(context); @@ -149,7 +149,7 @@ var failureMechanism = new DuneErosionFailureMechanism(); failureMechanism.DuneLocations.Add(new TestDuneLocation()); - var context = new DuneLocationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); + var context = new DuneLocationCalculationsContext(failureMechanism.DuneLocations, failureMechanism, assessmentSection); // Call bool additionalDataCheck = info.AdditionalDataCheck(context); @@ -170,7 +170,7 @@ mocks.ReplayAll(); var failureMechanism = new DuneErosionFailureMechanism(); - var context = new DuneLocationsContext( + var context = new DuneLocationCalculationsContext( new ObservableList(), failureMechanism, assessmentSection); @@ -203,7 +203,7 @@ var failureMechanism = new DuneErosionFailureMechanism(); var locations = new ObservableList(); - var data = new DuneLocationsContext( + var data = new DuneLocationCalculationsContext( locations, failureMechanism, assessmentSection);