Index: Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs =================================================================== diff -u -rd0615029ee52b3dbe0eda73c8cf9ba40e4353ee4 -re96306bc32984aa50c6d1162167214024ddcf59a --- Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision d0615029ee52b3dbe0eda73c8cf9ba40e4353ee4) +++ Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -270,9 +270,9 @@ { OpenLogClicked = () => { - if (gui.CommandHandler != null) + if (gui.ApplicationCommands != null) { - gui.CommandHandler.OpenLogFileExternal(); + gui.ApplicationCommands.OpenLogFileExternal(); } } }) Index: Core/Common/src/Core.Common.Gui/ApplicationFeatureCommandHandler.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Gui/ApplicationFeatureCommandHandler.cs (revision 0) +++ Core/Common/src/Core.Common.Gui/ApplicationFeatureCommandHandler.cs (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -0,0 +1,67 @@ +using System; +using System.Diagnostics; +using System.Linq; +using System.Windows.Forms; + +using Core.Common.Gui.Forms.MainWindow; +using Core.Common.Gui.Properties; +using Core.Common.Utils; +using log4net; +using log4net.Appender; + +namespace Core.Common.Gui +{ + /// + /// This class provides concrete implementations for . + /// + public class ApplicationFeatureCommandHandler : IApplicationFeatureCommands + { + private readonly IGui gui; + + public ApplicationFeatureCommandHandler(IGui gui) + { + this.gui = gui; + } + + /// + /// Makes the properties window visible and updates the to the + /// given . + /// + /// The object for which to show its properties. + public void ShowPropertiesFor(object obj) + { + ((MainWindow)gui.MainWindow).InitPropertiesWindowAndActivate(); + gui.Selection = obj; + } + + public bool CanShowPropertiesFor(object obj) + { + return gui.PropertyResolver.GetObjectProperties(obj) != null; + } + + public void OpenLogFileExternal() + { + bool logFileOpened = false; + + try + { + var fileAppender = + LogManager.GetAllRepositories().SelectMany(r => r.GetAppenders()).OfType + ().FirstOrDefault(); + if (fileAppender != null) + { + var logFile = fileAppender.File; + Process.Start(logFile); + logFileOpened = true; + } + } + catch (Exception) { } + + if (!logFileOpened) + { + MessageBox.Show(Resources.GuiCommandHandler_OpenLogFileExternal_Unable_to_open_log_file_Opening_log_file_directory_instead, Resources.GuiCommandHandler_OpenLogFileExternal_Unable_to_open_log_file); + Process.Start(SettingsHelper.GetApplicationLocalUserSettingsDirectory()); + } + } + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/ContextMenu/ContextMenuBuilder.cs =================================================================== diff -u -r7993dddd622b104506d59a43fd9add82d6ce48ae -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/src/Core.Common.Gui/ContextMenu/ContextMenuBuilder.cs (.../ContextMenuBuilder.cs) (revision 7993dddd622b104506d59a43fd9add82d6ce48ae) +++ Core/Common/src/Core.Common.Gui/ContextMenu/ContextMenuBuilder.cs (.../ContextMenuBuilder.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -16,10 +16,10 @@ private readonly ContextMenuStrip contextMenu; /// - /// Creates a new instance of , which uses the given to + /// Creates a new instance of , which uses the given to /// create a for the given . /// - /// The from which to obtain information to render and bind actions + /// The from which to obtain information to render and bind actions /// to the items of the . If null, this builder will not render items which /// require this type of information. /// The @@ -31,12 +31,12 @@ /// If null, this builder will not render items which require this type of information. /// The for which to create a . /// Thrown when the required object instances could not be created based on - /// the or . - public ContextMenuBuilder(IGuiCommandHandler commandHandler, IExportImportCommandHandler importExportHandler, IViewCommands viewsCommandsHandler, TreeNode treeNode) + /// the or . + public ContextMenuBuilder(IApplicationFeatureCommands featureCommandHandler, IExportImportCommandHandler importExportHandler, IViewCommands viewsCommandsHandler, TreeNode treeNode) { try { - guiItemsFactory = new GuiContextMenuItemFactory(commandHandler, importExportHandler, viewsCommandsHandler, treeNode); + guiItemsFactory = new GuiContextMenuItemFactory(featureCommandHandler, importExportHandler, viewsCommandsHandler, treeNode); treeViewItemsFactory = new TreeViewContextMenuItemFactory(treeNode); } catch (ArgumentNullException e) Index: Core/Common/src/Core.Common.Gui/ContextMenu/GuiContextMenuItemFactory.cs =================================================================== diff -u -r7993dddd622b104506d59a43fd9add82d6ce48ae -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/src/Core.Common.Gui/ContextMenu/GuiContextMenuItemFactory.cs (.../GuiContextMenuItemFactory.cs) (revision 7993dddd622b104506d59a43fd9add82d6ce48ae) +++ Core/Common/src/Core.Common.Gui/ContextMenu/GuiContextMenuItemFactory.cs (.../GuiContextMenuItemFactory.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -12,29 +12,29 @@ /// internal class GuiContextMenuItemFactory { - private readonly IGuiCommandHandler commandHandler; + private readonly IApplicationFeatureCommands applicationFeatureCommandHandler; private readonly IExportImportCommandHandler exportImportCommandHandler; private readonly IViewCommands viewCommands; private readonly TreeNode treeNode; /// /// Creates a new instance of , which uses the - /// to create . + /// to create . /// - /// The which contains information for creating the + /// The which contains information for creating the /// . /// The /// which contains information for creating the . /// The which contains /// information for creating the . /// The for which to create . - /// Thrown when either + /// Thrown when either /// or is null. - public GuiContextMenuItemFactory(IGuiCommandHandler commandHandler, IExportImportCommandHandler exportImportCommandHandler, IViewCommands viewCommandsHandler, TreeNode treeNode) + public GuiContextMenuItemFactory(IApplicationFeatureCommands applicationFeatureCommandHandler, IExportImportCommandHandler exportImportCommandHandler, IViewCommands viewCommandsHandler, TreeNode treeNode) { - if (commandHandler == null) + if (applicationFeatureCommandHandler == null) { - throw new ArgumentNullException("commandHandler", Resources.GuiContextMenuItemFactory_Can_not_create_gui_context_menu_items_without_gui); + throw new ArgumentNullException("applicationFeatureCommandHandler", Resources.GuiContextMenuItemFactory_Can_not_create_gui_context_menu_items_without_gui); } if (exportImportCommandHandler == null) { @@ -48,7 +48,7 @@ { throw new ArgumentNullException("treeNode", Resources.ContextMenuItemFactory_Can_not_create_context_menu_items_without_tree_node); } - this.commandHandler = commandHandler; + this.applicationFeatureCommandHandler = applicationFeatureCommandHandler; this.exportImportCommandHandler = exportImportCommandHandler; viewCommands = viewCommandsHandler; this.treeNode = treeNode; @@ -122,14 +122,14 @@ public ToolStripItem CreatePropertiesItem() { object dataObject = treeNode.Tag; - bool canShowProperties = commandHandler.CanShowPropertiesFor(dataObject); + bool canShowProperties = applicationFeatureCommandHandler.CanShowPropertiesFor(dataObject); var newItem = new ToolStripMenuItem(Resources.Properties) { ToolTipText = Resources.Properties_ToolTip, Image = Resources.PropertiesIcon, Enabled = canShowProperties }; - newItem.Click += (s, e) => commandHandler.ShowPropertiesFor(dataObject); + newItem.Click += (s, e) => applicationFeatureCommandHandler.ShowPropertiesFor(dataObject); return newItem; } Index: Core/Common/src/Core.Common.Gui/ContextMenu/IContextMenuBuilder.cs =================================================================== diff -u -rb326158bd228dc407858ba620a437a175baf0190 -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/src/Core.Common.Gui/ContextMenu/IContextMenuBuilder.cs (.../IContextMenuBuilder.cs) (revision b326158bd228dc407858ba620a437a175baf0190) +++ Core/Common/src/Core.Common.Gui/ContextMenu/IContextMenuBuilder.cs (.../IContextMenuBuilder.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -37,28 +37,28 @@ /// Adds an item to the , which opens a view for the data of the . /// /// The itself. - /// Thrown when the was not passed on construction. + /// Thrown when the was not passed on construction. IContextMenuBuilder AddOpenItem(); /// /// Adds an item to the , which exports the data of the . /// /// The itself. - /// Thrown when the was not passed on construction. + /// Thrown when the was not passed on construction. IContextMenuBuilder AddExportItem(); /// /// Adds an item to the , which imports the data of the . /// /// The itself. - /// Thrown when the was not passed on construction. + /// Thrown when the was not passed on construction. IContextMenuBuilder AddImportItem(); /// /// Adds an item to the , which shows properties of the data of the . /// /// The itself. - /// Thrown when the was not passed on construction. + /// Thrown when the was not passed on construction. IContextMenuBuilder AddPropertiesItem(); /// Index: Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj =================================================================== diff -u -r7c8a507ff0aafd03830a7faa8f801c5a3d3c6660 -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision 7c8a507ff0aafd03830a7faa8f801c5a3d3c6660) +++ Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -232,7 +232,7 @@ ViewSelectionContextMenuController.cs - + @@ -255,7 +255,7 @@ - + Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs =================================================================== diff -u -r7993dddd622b104506d59a43fd9add82d6ce48ae -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 7993dddd622b104506d59a43fd9add82d6ce48ae) +++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -1038,7 +1038,7 @@ private void OnFileHelpShowLog_Clicked(object sender, RoutedEventArgs e) { - Gui.CommandHandler.OpenLogFileExternal(); + Gui.ApplicationCommands.OpenLogFileExternal(); } private void OnFileManual_Clicked(object sender, RoutedEventArgs e) Fisheye: Tag e96306bc32984aa50c6d1162167214024ddcf59a refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/GuiCommandHandler.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Gui/IApplicationFeatureCommands.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Gui/IApplicationFeatureCommands.cs (revision 0) +++ Core/Common/src/Core.Common.Gui/IApplicationFeatureCommands.cs (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -0,0 +1,23 @@ +namespace Core.Common.Gui +{ + /// + /// Interface that declares application feature manipulation. + /// + public interface IApplicationFeatureCommands + { + /// + /// Activates the propertyGrid toolbox + /// + /// + void ShowPropertiesFor(object obj); + + /// + /// Indicates if there is a property view object for the current . + /// + /// + /// true if a property view is defined, false otherwise. + bool CanShowPropertiesFor(object obj); + + void OpenLogFileExternal(); + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/IGui.cs =================================================================== diff -u -r7993dddd622b104506d59a43fd9add82d6ce48ae -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision 7993dddd622b104506d59a43fd9add82d6ce48ae) +++ Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -51,7 +51,7 @@ /// /// Gets or sets CommandHandler. /// - IGuiCommandHandler CommandHandler { get; } + IApplicationFeatureCommands ApplicationCommands { get; } IStorageCommands StorageCommands { get; } Fisheye: Tag e96306bc32984aa50c6d1162167214024ddcf59a refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IGuiCommandHandler.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs =================================================================== diff -u -r7993dddd622b104506d59a43fd9add82d6ce48ae -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 7993dddd622b104506d59a43fd9add82d6ce48ae) +++ Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -1221,7 +1221,7 @@ } /// - /// Looks up a localized string similar to Kan geen 'GuiCommandHandler'-afhankelijk element in het contextmenu creëren zonder een 'GuiCommandHandler'.. + /// Looks up a localized string similar to Kan geen 'ApplicationFeatureCommandHandler'-afhankelijk element in het contextmenu creëren zonder een 'ApplicationFeatureCommandHandler'.. /// public static string GuiContextMenuItemFactory_Can_not_create_gui_context_menu_items_without_gui { get { Index: Core/Common/src/Core.Common.Gui/Properties/Resources.resx =================================================================== diff -u -r7993dddd622b104506d59a43fd9add82d6ce48ae -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 7993dddd622b104506d59a43fd9add82d6ce48ae) +++ Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -794,7 +794,7 @@ Kan geen contextmenu opbouwen voor een lege knoop. - Kan geen 'GuiCommandHandler'-afhankelijk element in het contextmenu creëren zonder een 'GuiCommandHandler'. + Kan geen 'ApplicationFeatureCommandHandler'-afhankelijk element in het contextmenu creëren zonder een 'ApplicationFeatureCommandHandler'. Kan geen element in het contextmenu creëren zonder dat de knoop bekend is. Index: Core/Common/src/Core.Common.Gui/RingtoetsGui.cs =================================================================== diff -u -r7c8a507ff0aafd03830a7faa8f801c5a3d3c6660 -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 7c8a507ff0aafd03830a7faa8f801c5a3d3c6660) +++ Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -68,7 +68,7 @@ private bool userSettingsDirty; private ApplicationSettingsBase userSettings; - private readonly GuiCommandHandler guiCommandHandler; + private readonly ApplicationFeatureCommandHandler appFeatureApplicationCommands; private StorageCommandHandler storageCommandHandler; private readonly ViewCommandHandler viewCommandHandler; private readonly ProjectCommandsHandler projectCommandsHandler; @@ -94,7 +94,7 @@ UserSettings = Settings.Default; - guiCommandHandler = new GuiCommandHandler(this); + appFeatureApplicationCommands = new ApplicationFeatureCommandHandler(this); viewCommandHandler = new ViewCommandHandler(this); storageCommandHandler = new StorageCommandHandler(viewCommandHandler, this); exportImportCommandHandler = new ExportImportCommandHandler(this); @@ -191,7 +191,7 @@ } } - public IGuiCommandHandler CommandHandler { get { return guiCommandHandler; } } + public IApplicationFeatureCommands ApplicationCommands { get { return appFeatureApplicationCommands; } } public IStorageCommands StorageCommands { @@ -298,7 +298,7 @@ public IContextMenuBuilder Get(TreeNode treeNode) { - return new ContextMenuBuilder(guiCommandHandler, exportImportCommandHandler, ViewCommands, treeNode); + return new ContextMenuBuilder(appFeatureApplicationCommands, exportImportCommandHandler, ViewCommands, treeNode); } public IEnumerable GetAllDataWithViewDefinitionsRecursively(object rootDataObject) Index: Core/Common/src/Core.Common.Gui/StorageCommandHandler.cs =================================================================== diff -u -r7993dddd622b104506d59a43fd9add82d6ce48ae -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/src/Core.Common.Gui/StorageCommandHandler.cs (.../StorageCommandHandler.cs) (revision 7993dddd622b104506d59a43fd9add82d6ce48ae) +++ Core/Common/src/Core.Common.Gui/StorageCommandHandler.cs (.../StorageCommandHandler.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -16,7 +16,7 @@ /// public class StorageCommandHandler : IStorageCommands, IObserver { - private static readonly ILog log = LogManager.GetLogger(typeof(GuiCommandHandler)); + private static readonly ILog log = LogManager.GetLogger(typeof(StorageCommandHandler)); private readonly IViewCommands viewCommands; private readonly IGui gui; Index: Core/Common/test/Core.Common.Gui.Test/ApplicationFeatureCommandHandlerTest.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Gui.Test/ApplicationFeatureCommandHandlerTest.cs (revision 0) +++ Core/Common/test/Core.Common.Gui.Test/ApplicationFeatureCommandHandlerTest.cs (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -0,0 +1,69 @@ +using Core.Common.Gui.Forms.PropertyGridView; +using NUnit.Framework; +using Rhino.Mocks; + +namespace Core.Common.Gui.Test +{ + public class ApplicationFeatureCommandHandlerTest + { + private MockRepository mocks; + + [SetUp] + public void SetUp() + { + mocks = new MockRepository(); + } + + [Test] + public void CanShowPropertiesFor_PropertiesForObjectDefined_True() + { + // Setup + var gui = mocks.DynamicMock(); + var propertyResolverMock = mocks.StrictMock(); + var anObject = new AnObject(); + + propertyResolverMock.Expect(pr => pr.GetObjectProperties(anObject)).Return(new object()); + gui.Expect(g => g.PropertyResolver).Return(propertyResolverMock); + + mocks.ReplayAll(); + + var commandHandler = new ApplicationFeatureCommandHandler(gui); + + // Call + var canShowProperties = commandHandler.CanShowPropertiesFor(anObject); + + // Assert + Assert.IsTrue(canShowProperties); + + mocks.VerifyAll(); + } + + [Test] + public void CanShowPropertiesFor_PropertiesForSuperObjectDefined_True() + { + // Setup + var gui = mocks.DynamicMock(); + var aSubObject = new ASubObject(); + var propertyResolverMock = mocks.StrictMock(); + + propertyResolverMock.Expect(pr => pr.GetObjectProperties(aSubObject)).Return(new object()); + gui.Expect(g => g.PropertyResolver).Return(propertyResolverMock); + + mocks.ReplayAll(); + + var commandHandler = new ApplicationFeatureCommandHandler(gui); + + // Call + var canShowProperties = commandHandler.CanShowPropertiesFor(aSubObject); + + // Assert + Assert.IsTrue(canShowProperties); + + mocks.VerifyAll(); + } + + public class AnObject {} + + public class ASubObject : AnObject {} + } +} \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs =================================================================== diff -u -r7993dddd622b104506d59a43fd9add82d6ce48ae -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs (.../ContextMenuBuilderTest.cs) (revision 7993dddd622b104506d59a43fd9add82d6ce48ae) +++ Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs (.../ContextMenuBuilderTest.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -56,12 +56,12 @@ { // Setup var treeNodeMock = mocks.StrictMock(); - var guiCommandHandler = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); mocks.ReplayAll(); // Call - TestDelegate test = () => new ContextMenuBuilder(guiCommandHandler, null, viewCommandsMock, treeNodeMock); + TestDelegate test = () => new ContextMenuBuilder(applicationFeatureCommandsMock, null, viewCommandsMock, treeNodeMock); // Assert var message = Assert.Throws(test).Message; @@ -74,13 +74,13 @@ public void Constructor_NoViewCommands_ThrowsContextMenuBuilderException() { // Setup - var guiCommandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMockMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var treeNodeMock = mocks.StrictMock(); mocks.ReplayAll(); // Call - TestDelegate test = () => new ContextMenuBuilder(guiCommandHandlerMock, exportImportHandlerMock, null, treeNodeMock); + TestDelegate test = () => new ContextMenuBuilder(applicationFeatureCommandsMockMock, exportImportHandlerMock, null, treeNodeMock); // Assert var message = Assert.Throws(test).Message; @@ -93,14 +93,14 @@ public void Constructor_ParamsSet_DoesNotThrow() { // Setup - var guiCommandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMockMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var treeNodeMock = mocks.StrictMock(); mocks.ReplayAll(); // Call - TestDelegate test = () => new ContextMenuBuilder(guiCommandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + TestDelegate test = () => new ContextMenuBuilder(applicationFeatureCommandsMockMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); // Assert Assert.DoesNotThrow(test); @@ -112,13 +112,13 @@ public void Build_NothingAdded_EmptyContextMenu() { // Setup - var guiCommandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMockMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var treeNodeMock = mocks.StrictMock(); mocks.ReplayAll(); - var builder = new ContextMenuBuilder(guiCommandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMockMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); // Call var result = builder.Build(); @@ -134,7 +134,7 @@ public void AddRenameItem_WhenBuild_ItemAddedToContextMenu() { // Setup - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); @@ -146,7 +146,7 @@ mocks.ReplayAll(); - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); // Call var result = builder.AddRenameItem().Build(); @@ -164,7 +164,7 @@ public void AddDeleteItem_WhenBuild_ItemAddedToContextMenu() { // Setup - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); @@ -182,7 +182,7 @@ mocks.ReplayAll(); - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); // Call var result = builder.AddDeleteItem().Build(); @@ -202,7 +202,7 @@ public void AddExpandAllItem_WhenBuild_ItemAddedToContextMenu(bool hasChildren) { // Setup - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var treeNodeMock = mocks.StrictMock(); @@ -215,7 +215,7 @@ mocks.ReplayAll(); - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); // Call var result = builder.AddExpandAllItem().Build(); @@ -235,7 +235,7 @@ public void AddCollapseAllItem_WhenBuild_ItemAddedToContextMenu(bool hasChildren) { // Setup - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var treeNodeMock = mocks.StrictMock(); @@ -248,7 +248,7 @@ mocks.ReplayAll(); - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); // Call var result = builder.AddCollapseAllItem().Build(); @@ -268,7 +268,7 @@ public void AddOpenItem_WhenBuild_ItemAddedToContextMenu(bool hasViewForNodeData) { // Setup - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var treeNodeMock = mocks.Stub(); @@ -280,7 +280,7 @@ treeNodeMock.Tag = nodeData; - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); // Call var result = builder.AddOpenItem().Build(); @@ -300,7 +300,7 @@ public void AddExportItem_WhenBuild_ItemAddedToContextMenu(bool hasExportersForNodeData) { // Setup - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var nodeData = new object(); @@ -311,7 +311,7 @@ treeNodeMock.Tag = nodeData; - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); // Call var result = builder.AddExportItem().Build(); @@ -331,7 +331,7 @@ public void AddImportItem_WhenBuild_ItemAddedToContextMenu(bool hasImportersForNodeData) { // Setup - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var nodeData = new object(); @@ -342,7 +342,7 @@ treeNodeMock.Tag = nodeData; - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); // Call var result = builder.AddImportItem().Build(); @@ -362,19 +362,19 @@ public void AddPropertiesItem_WhenBuild_ItemAddedToContextMenu(bool hasPropertiesForNodeData) { // Setup - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var nodeData = new object(); var treeNodeMock = mocks.Stub(); - commandHandlerMock.Expect(ch => ch.CanShowPropertiesFor(nodeData)).Return(hasPropertiesForNodeData); + applicationFeatureCommandsMock.Expect(ch => ch.CanShowPropertiesFor(nodeData)).Return(hasPropertiesForNodeData); mocks.ReplayAll(); treeNodeMock.Tag = nodeData; - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); // Call var result = builder.AddPropertiesItem().Build(); @@ -393,12 +393,12 @@ { // Setup var treeNodeMock = mocks.StrictMock(); - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); mocks.ReplayAll(); - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); var item = new StrictContextMenuItem(null,null,null,null); // Call @@ -418,12 +418,12 @@ { // Setup var treeNodeMock = mocks.StrictMock(); - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); mocks.ReplayAll(); - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); // Call var result = builder.AddSeparator().Build(); @@ -442,12 +442,12 @@ { // Setup var treeNodeMock = mocks.StrictMock(); - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); mocks.ReplayAll(); - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); var someItem = new StrictContextMenuItem(null, null, null, null); @@ -474,12 +474,12 @@ { // Setup var treeNodeMock = mocks.StrictMock(); - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); mocks.ReplayAll(); - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); var someItem = new StrictContextMenuItem(null, null, null, null); var someOtherItem = new StrictContextMenuItem(null, null, null, null); @@ -510,12 +510,12 @@ { // Setup var treeNodeMock = mocks.StrictMock(); - var commandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandsMock = mocks.StrictMock(); var exportImportHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); mocks.ReplayAll(); - var builder = new ContextMenuBuilder(commandHandlerMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); + var builder = new ContextMenuBuilder(applicationFeatureCommandsMock, exportImportHandlerMock, viewCommandsMock, treeNodeMock); builder.AddCustomItem(new StrictContextMenuItem(null, null, null, null)); Index: Core/Common/test/Core.Common.Gui.Test/ContextMenu/GuiContextMenuItemFactoryTest.cs =================================================================== diff -u -r7993dddd622b104506d59a43fd9add82d6ce48ae -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/test/Core.Common.Gui.Test/ContextMenu/GuiContextMenuItemFactoryTest.cs (.../GuiContextMenuItemFactoryTest.cs) (revision 7993dddd622b104506d59a43fd9add82d6ce48ae) +++ Core/Common/test/Core.Common.Gui.Test/ContextMenu/GuiContextMenuItemFactoryTest.cs (.../GuiContextMenuItemFactoryTest.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -35,13 +35,13 @@ public void Constructor_WithoutTreeNode_ThrowsArgumentNullException() { // Setup - var guiCommandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandHandler = mocks.StrictMock(); var exportImportCommandHandler = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); mocks.ReplayAll(); // Call - TestDelegate test = () => new GuiContextMenuItemFactory(guiCommandHandlerMock, exportImportCommandHandler, viewCommandsMock, null); + TestDelegate test = () => new GuiContextMenuItemFactory(applicationFeatureCommandHandler, exportImportCommandHandler, viewCommandsMock, null); // Assert var message = Assert.Throws(test).Message; @@ -55,12 +55,12 @@ public void Constructor_WithoutExportImportHandler_ThrowsArgumentNullException() { // Setup - var guiCommandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandHandler = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); mocks.ReplayAll(); // Call - TestDelegate test = () => new GuiContextMenuItemFactory(guiCommandHandlerMock, null, viewCommandsMock, null); + TestDelegate test = () => new GuiContextMenuItemFactory(applicationFeatureCommandHandler, null, viewCommandsMock, null); // Assert var message = Assert.Throws(test).Message; @@ -74,12 +74,12 @@ public void Constructor_WithoutViewCommandsHandler_ThrowsArgumentNullException() { // Setup - var guiCommandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandHandler = mocks.StrictMock(); var exportImportCommandHandlerMock = mocks.StrictMock(); mocks.ReplayAll(); // Call - TestDelegate test = () => new GuiContextMenuItemFactory(guiCommandHandlerMock, exportImportCommandHandlerMock, null, null); + TestDelegate test = () => new GuiContextMenuItemFactory(applicationFeatureCommandHandler, exportImportCommandHandlerMock, null, null); // Assert var message = Assert.Throws(test).Message; @@ -93,14 +93,14 @@ public void Constructor_WithAllInput_DoesNotThrow() { // Setup - var guiCommandHandlerMock = mocks.StrictMock(); + var applicationFeatureCommandHandler = mocks.StrictMock(); var exportImportCommandHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var treeNodeMock = mocks.Stub(); mocks.ReplayAll(); // Call - TestDelegate test = () => new GuiContextMenuItemFactory(guiCommandHandlerMock, exportImportCommandHandlerMock, viewCommandsMock, treeNodeMock); + TestDelegate test = () => new GuiContextMenuItemFactory(applicationFeatureCommandHandler, exportImportCommandHandlerMock, viewCommandsMock, treeNodeMock); // Assert Assert.DoesNotThrow(test); @@ -114,7 +114,7 @@ public void CreateOpenItem_Always_Disabled(bool hasViewersForNodeData) { // Setup - var commandHandlerMock = mocks.StrictMock(); + var commandHandlerMock = mocks.StrictMock(); var exportImportCommandHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var nodeData = new object(); @@ -150,7 +150,7 @@ public void CreateExportItem_Always_ItemWithPropertiesSet(bool hasExportersForNodeData) { // Setup - var commandHandlerMock = mocks.StrictMock(); + var commandHandlerMock = mocks.StrictMock(); var exportImportCommandHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var nodeData = new object(); @@ -186,7 +186,7 @@ public void CreateImportItem_Always_ItemWithPropertiesSet(bool hasImportersForNodeData) { // Setup - var commandHandlerMock = mocks.StrictMock(); + var commandHandlerMock = mocks.StrictMock(); var exportImportCommandHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var nodeData = new object(); @@ -222,7 +222,7 @@ public void CreatePropertiesItem_Always_ItemWithPropertiesSet(bool hasPropertyInfoForNodeData) { // Setup - var commandHandlerMock = mocks.StrictMock(); + var commandHandlerMock = mocks.StrictMock(); var exportImportCommandHandlerMock = mocks.StrictMock(); var viewCommandsMock = mocks.StrictMock(); var nodeData = new object(); Index: Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj =================================================================== diff -u -r7c8a507ff0aafd03830a7faa8f801c5a3d3c6660 -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision 7c8a507ff0aafd03830a7faa8f801c5a3d3c6660) +++ Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -69,7 +69,7 @@ - + Fisheye: Tag e96306bc32984aa50c6d1162167214024ddcf59a refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Gui.Test/GuiCommandHandlerTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorerGuiPlugin.cs =================================================================== diff -u -r71db3f262f1e940ee15e561fe582a7895a10aa64 -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorerGuiPlugin.cs (.../ProjectExplorerGuiPlugin.cs) (revision 71db3f262f1e940ee15e561fe582a7895a10aa64) +++ Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorerGuiPlugin.cs (.../ProjectExplorerGuiPlugin.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -37,7 +37,7 @@ /// Thrown when either: /// /// is null - /// is null + /// is null /// public override IEnumerable GetProjectTreeViewNodePresenters() { Index: Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerGuiPluginTest.cs =================================================================== diff -u -r71db3f262f1e940ee15e561fe582a7895a10aa64 -re96306bc32984aa50c6d1162167214024ddcf59a --- Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerGuiPluginTest.cs (.../ProjectExplorerGuiPluginTest.cs) (revision 71db3f262f1e940ee15e561fe582a7895a10aa64) +++ Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/ProjectExplorerGuiPluginTest.cs (.../ProjectExplorerGuiPluginTest.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -47,7 +47,7 @@ projectExplorerPluginGui, pluginGui }).Repeat.Any(); gui.Expect(g => g.ContextMenuProvider).Return(mocks.StrictMock()).Repeat.Any(); - gui.Stub(g=>g.CommandHandler).Return(mocks.StrictMock()); + gui.Stub(g=>g.ApplicationCommands).Return(mocks.StrictMock()); gui.Stub(g => g.ProjectCommands).Return(mocks.StrictMock()); gui.Project = project; Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/NodePresenters/PipingCalculationGroupContextNodePresenterTest.cs =================================================================== diff -u -r7993dddd622b104506d59a43fd9add82d6ce48ae -re96306bc32984aa50c6d1162167214024ddcf59a --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/NodePresenters/PipingCalculationGroupContextNodePresenterTest.cs (.../PipingCalculationGroupContextNodePresenterTest.cs) (revision 7993dddd622b104506d59a43fd9add82d6ce48ae) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/NodePresenters/PipingCalculationGroupContextNodePresenterTest.cs (.../PipingCalculationGroupContextNodePresenterTest.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -918,12 +918,12 @@ presenter.Expect(p => p.CanRemove(parentData, group)).Return(true); presenter.Expect(p => p.CanRenameNode(node)).Return(true); - var guiCommandHandler = mockRepository.Stub(); + var applicationFeatureCommandHandler = mockRepository.Stub(); var exportImportHandler = mockRepository.Stub(); var viewCommandsHandler = mockRepository.StrictMock(); mockRepository.ReplayAll(); - var menuBuilder = new ContextMenuBuilder(guiCommandHandler, exportImportHandler, viewCommandsHandler, node); + var menuBuilder = new ContextMenuBuilder(applicationFeatureCommandHandler, exportImportHandler, viewCommandsHandler, node); var contextMenuBuilderProvider = new SimpleContextMenuBuilderProvider(menuBuilder); var nodePresenter = new PipingCalculationGroupContextNodePresenter(contextMenuBuilderProvider); @@ -1021,12 +1021,12 @@ node.Stub(n => n.Parent).Return(nodeParent); node.Stub(n => n.Nodes).Return(new TreeNode[0]); - var guiCommandHandler = mockRepository.Stub(); + var applicationFeatureCommandHandler = mockRepository.Stub(); var exportImportHandler = mockRepository.Stub(); var viewCommandsHandler = mockRepository.StrictMock(); mockRepository.ReplayAll(); - var menuBuilder = new ContextMenuBuilder(guiCommandHandler, exportImportHandler, viewCommandsHandler ,node); + var menuBuilder = new ContextMenuBuilder(applicationFeatureCommandHandler, exportImportHandler, viewCommandsHandler ,node); var contextMenuBuilderProvider = new SimpleContextMenuBuilderProvider(menuBuilder); var nodePresenter = new PipingCalculationGroupContextNodePresenter(contextMenuBuilderProvider); @@ -1120,12 +1120,12 @@ node.Stub(n => n.Parent).Return(nodeParent); node.Stub(n => n.Nodes).Return(new TreeNode[0]); - var guiCommandHandler = mockRepository.Stub(); + var applicationFeatureCommandHandler = mockRepository.Stub(); var exportImportHandler = mockRepository.Stub(); var viewCommandsHandler = mockRepository.StrictMock(); mockRepository.ReplayAll(); - var menuBuilder = new ContextMenuBuilder(guiCommandHandler, exportImportHandler, viewCommandsHandler,node); + var menuBuilder = new ContextMenuBuilder(applicationFeatureCommandHandler, exportImportHandler, viewCommandsHandler,node); var contextMenuBuilderProvider = new SimpleContextMenuBuilderProvider(menuBuilder); var nodePresenter = new PipingCalculationGroupContextNodePresenter(contextMenuBuilderProvider); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/NodePresenters/PipingFailureMechanismNodePresenterTest.cs =================================================================== diff -u -r7993dddd622b104506d59a43fd9add82d6ce48ae -re96306bc32984aa50c6d1162167214024ddcf59a --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/NodePresenters/PipingFailureMechanismNodePresenterTest.cs (.../PipingFailureMechanismNodePresenterTest.cs) (revision 7993dddd622b104506d59a43fd9add82d6ce48ae) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/NodePresenters/PipingFailureMechanismNodePresenterTest.cs (.../PipingFailureMechanismNodePresenterTest.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -401,12 +401,12 @@ var nodeMock = mockRepository.Stub(); nodeMock.Tag = failureMechanism; - var commandHandler = mockRepository.Stub(); + var applicationFeatureCommandHandler = mockRepository.Stub(); var exportImportHandler = mockRepository.Stub(); var viewCommandsHandler = mockRepository.StrictMock(); mockRepository.ReplayAll(); - var contextMenuBuilder = new ContextMenuBuilder(commandHandler, exportImportHandler, viewCommandsHandler, nodeMock); + var contextMenuBuilder = new ContextMenuBuilder(applicationFeatureCommandHandler, exportImportHandler, viewCommandsHandler, nodeMock); var contextMenuBuilderProviderMock = new SimpleContextMenuBuilderProvider(contextMenuBuilder); var nodePresenter = new PipingFailureMechanismNodePresenter(contextMenuBuilderProviderMock); Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs =================================================================== diff -u -r532fa11831d39c203e8511375e2d57a92fe7c5fa -re96306bc32984aa50c6d1162167214024ddcf59a --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs (.../PipingGuiPluginTest.cs) (revision 532fa11831d39c203e8511375e2d57a92fe7c5fa) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingGuiPluginTest.cs (.../PipingGuiPluginTest.cs) (revision e96306bc32984aa50c6d1162167214024ddcf59a) @@ -87,7 +87,7 @@ var applicationCore = new ApplicationCore(); var guiStub = mocks.Stub(); - guiStub.Stub(g => g.CommandHandler).Return(mocks.Stub()); + guiStub.Stub(g => g.ApplicationCommands).Return(mocks.Stub()); var contextMenuProviderMock = mocks.DynamicMock(); Expect.Call(guiStub.ApplicationCore).Return(applicationCore).Repeat.Any();