Index: Core/Common/src/Core.Common.Base/Core.Common.Base.csproj
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Common/src/Core.Common.Base/Core.Common.Base.csproj (.../Core.Common.Base.csproj) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Common/src/Core.Common.Base/Core.Common.Base.csproj (.../Core.Common.Base.csproj) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -112,7 +112,6 @@
-
True
Fisheye: Tag a32bbe3919b6babd74ae4867e8337662aed0dad2 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Base/Data/Project.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj
===================================================================
diff -u -r9061a3986829cbc8d619a8d9f7a0ea61a67b3dd3 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision 9061a3986829cbc8d619a8d9f7a0ea61a67b3dd3)
+++ Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -136,7 +136,6 @@
-
Index: Core/Common/src/Core.Common.Gui/GuiCore.cs
===================================================================
diff -u -r0a30c1488bb2d215a84c02566382244fa2dcfd52 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision 0a30c1488bb2d215a84c02566382244fa2dcfd52)
+++ Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -130,6 +130,12 @@
public IPropertyResolver PropertyResolver { get; private set; }
+ #region Implementation: ISettingsOwner
+
+ public GuiCoreSettings FixedSettings { get; private set; }
+
+ #endregion
+
public void Dispose()
{
Dispose(true);
@@ -668,14 +674,8 @@
#endregion
- #region Implementation: ISettingsOwner
+ #region Implementation: IPluginHost
- public GuiCoreSettings FixedSettings { get; private set; }
-
- #endregion
-
- #region Implementation: IGuiPluginHost
-
public IList Plugins { get; private set; }
public IEnumerable GetTreeNodeInfos()
Fisheye: Tag a32bbe3919b6babd74ae4867e8337662aed0dad2 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/Plugin/DataItemInfo.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/Plugin/PluginBase.cs
===================================================================
diff -u -r62866464bfe7d4dc1949370f577365d51c25bfa0 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Common/src/Core.Common.Gui/Plugin/PluginBase.cs (.../PluginBase.cs) (revision 62866464bfe7d4dc1949370f577365d51c25bfa0)
+++ Core/Common/src/Core.Common.Gui/Plugin/PluginBase.cs (.../PluginBase.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -39,7 +39,7 @@
public virtual IGui Gui { get; set; }
///
- /// Ribbon command handler (adding tabs, groups, buttons, etc.) which can be provided by the gui plugin.
+ /// Ribbon command handler (adding tabs, groups, buttons, etc.) which can be provided by the plugin.
///
public virtual IRibbonCommandHandler RibbonCommandHandler
{
@@ -78,15 +78,6 @@
}
///
- /// This method returns an enumeration of .
- ///
- /// The enumeration of provided by the .
- public virtual IEnumerable GetDataItemInfos()
- {
- yield break;
- }
-
- ///
/// Returns all instances provided for data of this plugin.
///
public virtual IEnumerable GetPropertyInfos()
Index: Core/Common/test/Core.Common.Base.Test/Core.Common.Base.Test.csproj
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Common/test/Core.Common.Base.Test/Core.Common.Base.Test.csproj (.../Core.Common.Base.Test.csproj) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Common/test/Core.Common.Base.Test/Core.Common.Base.Test.csproj (.../Core.Common.Base.Test.csproj) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -95,7 +95,6 @@
-
Fisheye: Tag a32bbe3919b6babd74ae4867e8337662aed0dad2 refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Base.Test/Data/ProjectTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/test/Core.Common.Gui.Test/Commands/StorageCommandHandlerTest.cs
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Common/test/Core.Common.Gui.Test/Commands/StorageCommandHandlerTest.cs (.../StorageCommandHandlerTest.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Common/test/Core.Common.Gui.Test/Commands/StorageCommandHandlerTest.cs (.../StorageCommandHandlerTest.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -144,16 +144,16 @@
{
// Setup
const string someValidFilePath = "";
- var project = new Project();
+ var projectMock = mocks.Stub();
const string exceptionMessage = "";
var projectStorage = mocks.StrictMock();
- projectStorage.Expect(ps => ps.SaveProject(someValidFilePath, project)).
+ projectStorage.Expect(ps => ps.SaveProject(someValidFilePath, projectMock)).
Throw(new StorageException(exceptionMessage, new Exception("l33t h4xor!")));
var mainWindowController = mocks.StrictMock();
var projectOwner = mocks.Stub();
- projectOwner.Project = project;
+ projectOwner.Project = projectMock;
projectOwner.ProjectFilePath = someValidFilePath;
mocks.ReplayAll();
@@ -182,14 +182,14 @@
public void SaveProject_SavingProjectIsSuccessful_LogSuccessAndReturnTrue()
{
// Setup
- var project = new Project("");
+ var projectMock = mocks.Stub();
const string someValidFilePath = "";
var projectStorage = mocks.Stub();
- projectStorage.Expect(ps => ps.SaveProject(someValidFilePath, project));
+ projectStorage.Expect(ps => ps.SaveProject(someValidFilePath, projectMock));
var mainWindowController = mocks.StrictMock();
var projectOwner = mocks.Stub();
- projectOwner.Project = project;
+ projectOwner.Project = projectMock;
projectOwner.ProjectFilePath = someValidFilePath;
mocks.ReplayAll();
@@ -204,7 +204,7 @@
// Assert
var expectedMessage = string.Format("Het Ringtoetsproject '{0}' is succesvol opgeslagen.",
- project.Name);
+ projectMock.Name);
TestHelper.AssertLogMessageIsGenerated(call, expectedMessage, 1);
Assert.IsTrue(result);
@@ -288,7 +288,7 @@
const string fileName = "newProject";
string pathToSomeInvalidFile = string.Format("C://folder/directory/{0}.rtd",
fileName);
- var loadedProject = new Project();
+ var loadedProject = mocks.Stub();
var projectStorage = mocks.Stub();
projectStorage.Stub(ps => ps.LoadProject(pathToSomeInvalidFile))
@@ -317,7 +317,7 @@
TestHelper.AssertLogMessagesAreGenerated(call, expectedMessages, 2);
Assert.IsTrue(result);
- Assert.IsInstanceOf(projectOwner.Project);
+ Assert.IsInstanceOf(projectOwner.Project);
Assert.AreEqual(pathToSomeInvalidFile, projectOwner.ProjectFilePath);
Assert.AreEqual(fileName, projectOwner.Project.Name);
mocks.VerifyAll();
@@ -330,8 +330,8 @@
const string fileName = "newProject";
string pathToSomeValidFile = string.Format("C://folder/directory/{0}.rtd",
fileName);
- var loadedProject = new Project();
- var originalProject = new Project("Original");
+ var loadedProject = mocks.Stub();
+ var originalProject = mocks.Stub();
var projectStorage = mocks.Stub();
projectStorage.Stub(ps => ps.LoadProject(pathToSomeValidFile))
@@ -365,7 +365,7 @@
TestHelper.AssertLogMessagesAreGenerated(call, expectedMessages, 2);
Assert.IsTrue(result);
- Assert.IsInstanceOf(projectOwner.Project);
+ Assert.IsInstanceOf(projectOwner.Project);
Assert.AreEqual(pathToSomeValidFile, projectOwner.ProjectFilePath);
Assert.AreEqual(fileName, projectOwner.Project.Name);
mocks.VerifyAll();
Index: Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj
===================================================================
diff -u -rf8f60a1f81812c31026cdb2bcda40e70cfc3d434 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision f8f60a1f81812c31026cdb2bcda40e70cfc3d434)
+++ Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -108,7 +108,6 @@
TestView.cs
-
Fisheye: Tag a32bbe3919b6babd74ae4867e8337662aed0dad2 refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Gui.Test/Plugin/DataItemInfoTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/test/Core.Common.Gui.Test/Plugin/PluginBaseTest.cs
===================================================================
diff -u -ra1ec5faebf7ccf8e67fa34a2b73cd1063ab48840 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Common/test/Core.Common.Gui.Test/Plugin/PluginBaseTest.cs (.../PluginBaseTest.cs) (revision a1ec5faebf7ccf8e67fa34a2b73cd1063ab48840)
+++ Core/Common/test/Core.Common.Gui.Test/Plugin/PluginBaseTest.cs (.../PluginBaseTest.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -19,7 +19,6 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System.Linq;
using Core.Common.Gui.Plugin;
using NUnit.Framework;
using Rhino.Mocks;
@@ -237,19 +236,6 @@
}
[Test]
- public void GetDataItemInfos_ReturnEmptyEnumerable()
- {
- // Setup
- var plugin = new SimplePlugin();
-
- // Call
- var dataItemInfos = plugin.GetDataItemInfos().ToArray();
-
- // Assert
- CollectionAssert.IsEmpty(dataItemInfos);
- }
-
- [Test]
public void Dispose_SetGuiToNull()
{
// Setup
Index: Core/Plugins/src/Core.Plugins.CommonTools/CommonToolsPlugin.cs
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Plugins/src/Core.Plugins.CommonTools/CommonToolsPlugin.cs (.../CommonToolsPlugin.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Plugins/src/Core.Plugins.CommonTools/CommonToolsPlugin.cs (.../CommonToolsPlugin.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -20,24 +20,17 @@
// All rights reserved.
using System.Collections.Generic;
-using Core.Common.Base.Data;
using Core.Common.Gui.Forms;
using Core.Common.Gui.Plugin;
using Core.Common.Gui.Properties;
-using Core.Plugins.CommonTools.Property;
namespace Core.Plugins.CommonTools
{
///
- /// This class configures general GUI components.
+ /// This class configures general plugin components.
///
public class CommonToolsPlugin : PluginBase
{
- public override IEnumerable GetPropertyInfos()
- {
- yield return new PropertyInfo();
- }
-
public override IEnumerable GetViewInfos()
{
yield return new ViewInfo
Index: Core/Plugins/src/Core.Plugins.CommonTools/Core.Plugins.CommonTools.csproj
===================================================================
diff -u -r90f09f42b0e182615dba7007fc5866d90a92b605 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Plugins/src/Core.Plugins.CommonTools/Core.Plugins.CommonTools.csproj (.../Core.Plugins.CommonTools.csproj) (revision 90f09f42b0e182615dba7007fc5866d90a92b605)
+++ Core/Plugins/src/Core.Plugins.CommonTools/Core.Plugins.CommonTools.csproj (.../Core.Plugins.CommonTools.csproj) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -55,7 +55,6 @@
True
True
-
Fisheye: Tag a32bbe3919b6babd74ae4867e8337662aed0dad2 refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.CommonTools/Property/ProjectProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Plugins/test/Core.Plugins.CommonTools.Test/CommonToolsPluginTest.cs
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Plugins/test/Core.Plugins.CommonTools.Test/CommonToolsPluginTest.cs (.../CommonToolsPluginTest.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Plugins/test/Core.Plugins.CommonTools.Test/CommonToolsPluginTest.cs (.../CommonToolsPluginTest.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -20,11 +20,9 @@
// All rights reserved.
using System.Linq;
-using Core.Common.Base.Data;
using Core.Common.Gui.Forms;
using Core.Common.Gui.Properties;
using Core.Common.TestUtil;
-using Core.Plugins.CommonTools.Property;
using NUnit.Framework;
namespace Core.Plugins.CommonTools.Test
@@ -33,23 +31,6 @@
public class CommonToolsPluginTest
{
[Test]
- public void GetCommonToolsPluginProperties_Always_ReturnProperties()
- {
- // Setup
- var plugin = new CommonToolsPlugin();
-
- // Call
- var propertyInfos = plugin.GetPropertyInfos().ToList();
-
- // Assert
- Assert.AreEqual(1, propertyInfos.Count);
-
- var projectPropertyInfo = propertyInfos.First(pi => pi.DataType == typeof(IProject));
-
- Assert.AreEqual(typeof(ProjectProperties), projectPropertyInfo.PropertyObjectType);
- }
-
- [Test]
public void GetCommonToolsPluginProperties_Always_ReturnViews()
{
// Setup
Index: Core/Plugins/test/Core.Plugins.CommonTools.Test/Core.Plugins.CommonTools.Test.csproj
===================================================================
diff -u -r90f09f42b0e182615dba7007fc5866d90a92b605 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Plugins/test/Core.Plugins.CommonTools.Test/Core.Plugins.CommonTools.Test.csproj (.../Core.Plugins.CommonTools.Test.csproj) (revision 90f09f42b0e182615dba7007fc5866d90a92b605)
+++ Core/Plugins/test/Core.Plugins.CommonTools.Test/Core.Plugins.CommonTools.Test.csproj (.../Core.Plugins.CommonTools.Test.csproj) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -71,7 +71,6 @@
-
Fisheye: Tag a32bbe3919b6babd74ae4867e8337662aed0dad2 refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.CommonTools.Test/Property/ProjectPropertiesTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerPluginTest.cs
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerPluginTest.cs (.../ProjectExplorerPluginTest.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerPluginTest.cs (.../ProjectExplorerPluginTest.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -228,6 +228,8 @@
var mocks = new MockRepository();
var guiStub = mocks.Stub();
var viewHost = mocks.StrictMock();
+ var initialProjectMock = mocks.Stub();
+ var newProjectMock = mocks.Stub();
guiStub.Stub(g => g.ApplicationCommands).Return(mocks.Stub());
guiStub.Stub(g => g.ViewCommands).Return(mocks.Stub());
guiStub.Stub(g => g.GetTreeNodeInfos()).Return(new[]
@@ -258,21 +260,19 @@
Gui = guiStub
})
{
- var initialProject = new Project();
- guiStub.Project = initialProject;
+ guiStub.Project = initialProjectMock;
plugin.Activate();
// Precondition
Assert.AreEqual(1, toolViews.Count);
- Assert.AreSame(initialProject, toolViews[0].Data);
+ Assert.AreSame(initialProjectMock, toolViews[0].Data);
// Call
- var newProject = new Project();
- guiStub.Project = newProject;
- guiStub.Raise(s => s.ProjectOpened += null, newProject);
+ guiStub.Project = newProjectMock;
+ guiStub.Raise(s => s.ProjectOpened += null, newProjectMock);
// Assert
- Assert.AreSame(newProject, toolViews[0].Data);
+ Assert.AreSame(newProjectMock, toolViews[0].Data);
}
}
}
Index: Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerTest.cs
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerTest.cs (.../ProjectExplorerTest.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerTest.cs (.../ProjectExplorerTest.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -120,17 +120,16 @@
}
};
+ var projectStub = mocks.Stub();
mocks.ReplayAll();
- var project = new Project();
-
using (var explorer = new ProjectExplorer(applicationSelection, viewCommands, treeNodeInfos))
{
// Call
- explorer.Data = project;
+ explorer.Data = projectStub;
// Assert
- Assert.AreSame(project, explorer.TreeViewControl.Data);
+ Assert.AreSame(projectStub, explorer.TreeViewControl.Data);
}
mocks.VerifyAll();
}
@@ -151,9 +150,9 @@
}
};
- var project = new Project();
+ var projectStub = mocks.Stub();
- viewCommands.Expect(vc => vc.RemoveAllViewsForItem(project));
+ viewCommands.Expect(vc => vc.RemoveAllViewsForItem(projectStub));
mocks.ReplayAll();
@@ -165,11 +164,11 @@
using (var explorer = new ProjectExplorer(applicationSelection, viewCommands, treeNodeInfos)
{
- Data = project
+ Data = projectStub
})
{
// Call
- explorer.TreeViewControl.TryRemoveNodeForData(project);
+ explorer.TreeViewControl.TryRemoveNodeForData(projectStub);
}
// Assert
mocks.VerifyAll();
@@ -184,7 +183,7 @@
IApplicationSelection applicationSelection = mocks.StrictMock();
IViewCommands viewCommands = mocks.StrictMock();
- var project = new Project();
+ var projectStub = mocks.Stub();
var stringA = "testA";
var stringB = "testB";
@@ -207,7 +206,7 @@
using (mocks.Ordered())
{
- applicationSelection.Expect(a => a.Selection = project);
+ applicationSelection.Expect(a => a.Selection = projectStub);
applicationSelection.Expect(a => a.Selection = stringA);
applicationSelection.Expect(a => a.Selection = null);
}
@@ -216,7 +215,7 @@
using (var explorer = new ProjectExplorer(applicationSelection, viewCommands, treeNodeInfos)
{
- Data = project
+ Data = projectStub
})
{
WindowsFormsTestHelper.Show(explorer.TreeViewControl);
@@ -245,7 +244,7 @@
IApplicationSelection applicationSelection = mocks.Stub();
IViewCommands viewCommands = mocks.StrictMock();
- var project = new Project();
+ var projectStub = mocks.Stub();
IEnumerable treeNodeInfos = new[]
{
@@ -264,7 +263,7 @@
using (var explorer = new ProjectExplorer(applicationSelection, viewCommands, treeNodeInfos)
{
- Data = project
+ Data = projectStub
})
{
var form = new Form
@@ -277,7 +276,7 @@
TypeUtils.GetField(explorer.TreeViewControl, "treeView").Name = treeIdentifier;
// Precondition
- Assert.AreSame(explorer.TreeViewControl.SelectedData, project);
+ Assert.AreSame(explorer.TreeViewControl.SelectedData, projectStub);
var tester = new TreeViewTester(treeIdentifier);
Index: Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerViewControllerTest.cs
===================================================================
diff -u -r1eed3e3f652618c52a462edc502cfd4250772314 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerViewControllerTest.cs (.../ProjectExplorerViewControllerTest.cs) (revision 1eed3e3f652618c52a462edc502cfd4250772314)
+++ Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerViewControllerTest.cs (.../ProjectExplorerViewControllerTest.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -191,6 +191,7 @@
IViewController viewController = mocks.Stub();
viewController.Stub(tvc => tvc.ViewHost).Return(viewHost);
+ var projectStub = mocks.Stub();
mocks.ReplayAll();
IEnumerable treeNodeInfos = new[]
@@ -201,18 +202,16 @@
}
};
- var project = new Project();
-
using (var controller = new ProjectExplorerViewController(viewCommands, applicationSelection, viewController, treeNodeInfos))
{
controller.ToggleView();
// Call
- controller.Update(project);
+ controller.Update(projectStub);
// Assert
Assert.AreEqual(1, toolViewList.Count);
- Assert.AreSame(project, toolViewList[0].Data);
+ Assert.AreSame(projectStub, toolViewList[0].Data);
}
mocks.VerifyAll();
}
@@ -231,16 +230,15 @@
viewController.Stub(tvc => tvc.ViewHost).Return(viewHost);
viewHost.Stub(vm => vm.ToolViews).Return(new List());
+ var projectStub = mocks.StrictMock();
mocks.ReplayAll();
IEnumerable treeNodeInfos = Enumerable.Empty();
- var project = new Project();
-
using (var controller = new ProjectExplorerViewController(viewCommands, applicationSelection, viewController, treeNodeInfos))
{
// Call
- controller.Update(project);
+ controller.Update(projectStub);
}
// Assert
mocks.VerifyAll();
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs
===================================================================
diff -u -re2e6d944af7b0cea6c9c34e77bd0644149526c37 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision e2e6d944af7b0cea6c9c34e77bd0644149526c37)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -371,32 +371,6 @@
yield return new FailureMechanismSectionsImporter();
}
- public override IEnumerable GetDataItemInfos()
- {
- IAssessmentSection assessmentSection = GetAssessmentSectionFromFile();
-
- if (assessmentSection == null)
- {
- return Enumerable.Empty();
- }
-
- return new DataItemInfo[]
- {
- new DataItemInfo
- {
- Name = RingtoetsFormsResources.AssessmentSection_DisplayName,
- Category = RingtoetsCommonFormsResources.Ringtoets_Category,
- Image = RingtoetsFormsResources.AssessmentSectionFolderIcon,
- CreateData = owner =>
- {
- var project = (RingtoetsProject) owner;
- assessmentSection.Name = GetUniqueForAssessmentSectionName(project.AssessmentSections, assessmentSection.Name);
- return assessmentSection;
- }
- }
- };
- }
-
///
/// Gets the child data instances that have definitions of some parent data object.
///
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismContextTreeNodeInfoTest.cs
===================================================================
diff -u -rc2a53f433c73742ae8eb70e0786c71d4b9826143 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismContextTreeNodeInfoTest.cs (.../FailureMechanismContextTreeNodeInfoTest.cs) (revision c2a53f433c73742ae8eb70e0786c71d4b9826143)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/FailureMechanismContextTreeNodeInfoTest.cs (.../FailureMechanismContextTreeNodeInfoTest.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -484,7 +484,6 @@
}
/* Used in ChildNodeObjects_FailureMechanismIsRelevantWithDifferentFailureMechanismSectionResults_OutputNodeAdded(Type) */
-
public void ChildNodeObjects_FailureMechanismIsRelevantWithSectionResults_OutputNodeAdded() where T : FailureMechanismSectionResult
{
// Setup
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs
===================================================================
diff -u -re2e6d944af7b0cea6c9c34e77bd0644149526c37 -ra32bbe3919b6babd74ae4867e8337662aed0dad2
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision e2e6d944af7b0cea6c9c34e77bd0644149526c37)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2)
@@ -658,53 +658,6 @@
mockRepository.VerifyAll();
}
- [Test]
- public void GetDataItemInfos_ReturnsExpectedDataItemDefinitions()
- {
- // Setup
- var mockRepository = new MockRepository();
- var windows = mockRepository.Stub();
- var guiMock = mockRepository.StrictMock();
- guiMock.Stub(g => g.SelectionChanged += null).IgnoreArguments();
- guiMock.Stub(g => g.SelectionChanged -= null).IgnoreArguments();
- guiMock.Expect(g => g.ProjectOpened += null).IgnoreArguments();
- guiMock.Stub(g => g.ProjectOpened -= null).IgnoreArguments();
- guiMock.Expect(g => g.MainWindow).Return(windows);
- mockRepository.ReplayAll();
-
- string pathValidFolder = Path.Combine(testDataPath, "ValidShapeFile");
-
- using (var plugin = new RingtoetsPlugin())
- {
- plugin.Gui = guiMock;
-
- SetShapeFileDirectory(plugin, pathValidFolder);
-
- DialogBoxHandler = (name, wnd) =>
- {
- var selectionDialog = (ReferenceLineMetaSelectionDialog) new FormTester(name).TheObject;
- var grid = (DataGridViewControl) new ControlTester("ReferenceLineMetaDataGridViewControl", selectionDialog).TheObject;
- var dataGridView = grid.Controls.OfType().First();
- dataGridView[0, 0].Selected = true;
- new ButtonTester("Ok", selectionDialog).Click();
- };
-
- // Call
- var dataItemDefinitions = plugin.GetDataItemInfos().ToArray();
-
- // Assert
- Assert.AreEqual(1, dataItemDefinitions.Length);
-
- DataItemInfo assessmentSectionDataItemDefinition = dataItemDefinitions.Single(did => did.ValueType == typeof(IAssessmentSection));
- Assert.AreEqual("Traject", assessmentSectionDataItemDefinition.Name);
- Assert.AreEqual("Algemeen", assessmentSectionDataItemDefinition.Category);
- TestHelper.AssertImagesAreEqual(RingtoetsFormsResources.AssessmentSectionFolderIcon, assessmentSectionDataItemDefinition.Image);
- Assert.IsNull(assessmentSectionDataItemDefinition.AdditionalOwnerCheck);
- Assert.IsInstanceOf(assessmentSectionDataItemDefinition.CreateData(new RingtoetsProject()));
- }
- mockRepository.VerifyAll();
- }
-
private static void SetShapeFileDirectory(RingtoetsPlugin plugin, string nonExistingFolder)
{
string privateShapeFileDirectoryName = "shapeFileDirectory";