Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rfb9bf56793b90226745888c194ba6ae760f83f4c -r6ce3cfa19ef59b12462bae4a77e9a7ee5a05e28c --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision fb9bf56793b90226745888c194ba6ae760f83f4c) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 6ce3cfa19ef59b12462bae4a77e9a7ee5a05e28c) @@ -69,7 +69,7 @@ private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); - private IGui guiMock; + private IGui gui; private TreeNodeInfo info; private MockRepository mocks; private ClosingStructuresPlugin plugin; @@ -78,10 +78,10 @@ public void SetUp() { mocks = new MockRepository(); - guiMock = mocks.Stub(); + gui = mocks.Stub(); plugin = new ClosingStructuresPlugin { - Gui = guiMock + Gui = gui }; info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(ClosingStructuresCalculationGroupContext)); @@ -213,8 +213,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(cmp => cmp.Get(groupContext, treeViewControl)).Return(menuBuilderMock); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(cmp => cmp.Get(groupContext, treeViewControl)).Return(menuBuilderMock); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -240,8 +240,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); - guiMock.Stub(g => g.ViewCommands).Return(mocks.Stub()); + gui.Stub(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); + gui.Stub(g => g.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -300,8 +300,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -356,7 +356,7 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(cmp => cmp.Get(groupContext, treeViewControl)).Return(menuBuilderMock); + gui.Stub(cmp => cmp.Get(groupContext, treeViewControl)).Return(menuBuilderMock); mocks.ReplayAll(); @@ -385,7 +385,7 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); + gui.Stub(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); mocks.ReplayAll(); // Call @@ -448,8 +448,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -498,8 +498,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -556,8 +556,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -614,8 +614,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(g => g.Get(nodeData, treeViewControl)).Return(menuBuilder); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -678,15 +678,15 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); - guiMock.Expect(g => g.MainWindow).Return(mainWindow); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); + gui.Stub(g => g.MainWindow).Return(mainWindow); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); assessmentSection.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; - plugin.Gui = guiMock; + plugin.Gui = gui; DialogBoxHandler = (name, wnd) => { @@ -759,12 +759,12 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(g => g.Get(groupContext, treeViewControl)).Return(menuBuilder); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); - plugin.Gui = guiMock; + plugin.Gui = gui; using (ContextMenuStrip contextMenu = info.ContextMenuStrip(groupContext, null, treeViewControl)) { @@ -805,8 +805,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -851,8 +851,8 @@ using (var treeViewControl = new TreeViewControl()) { - guiMock.Expect(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); @@ -904,13 +904,13 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var mainWindow = mocks.Stub(); - guiMock.Expect(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Expect(g => g.MainWindow).Return(mainWindow); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); + gui.Stub(g => g.MainWindow).Return(mainWindow); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); - plugin.Gui = guiMock; + plugin.Gui = gui; DialogBoxHandler = (name, wnd) => { @@ -962,13 +962,13 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var mainWindow = mocks.Stub(); - guiMock.Expect(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Expect(g => g.MainWindow).Return(mainWindow); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); + gui.Stub(g => g.MainWindow).Return(mainWindow); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); - plugin.Gui = guiMock; + plugin.Gui = gui; DialogBoxHandler = (name, wnd) => { @@ -1027,13 +1027,13 @@ var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); var mainWindow = mocks.Stub(); - guiMock.Expect(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); - guiMock.Expect(g => g.MainWindow).Return(mainWindow); - guiMock.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); + gui.Stub(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilder); + gui.Stub(g => g.MainWindow).Return(mainWindow); + gui.Stub(cmp => cmp.ViewCommands).Return(mocks.Stub()); mocks.ReplayAll(); - plugin.Gui = guiMock; + plugin.Gui = gui; DialogBoxHandler = (name, wnd) => {