本文整理汇总了C#中IWindowManager.Stub方法的典型用法代码示例。如果您正苦于以下问题:C# IWindowManager.Stub方法的具体用法?C# IWindowManager.Stub怎么用?C# IWindowManager.Stub使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IWindowManager
的用法示例。
在下文中一共展示了IWindowManager.Stub方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetUp
public void SetUp()
{
windowManager = MockRepository.GenerateStub<IWindowManager>();
windowManager.Stub(wm => wm.Register(Arg<string>.Is.Anything, Arg<Action>.Is.Anything, Arg<Location>.Is.Anything))
.Do((Action<string, Action, Location>)((i, a, l) => a()));
menuManager = MockRepository.GenerateStub<IMenuManager>();
windowManager.Stub(wm => wm.MenuManager).Return(menuManager);
var executionLogController = MockRepository.GenerateStub<IExecutionLogController>();
var optionsController = MockRepository.GenerateStub<IOptionsController>();
executionLogPackage = new ExecutionLogPackage(windowManager, executionLogController, optionsController);
}
示例2: SetUp
public void SetUp()
{
windowManager = MockRepository.GenerateStub<IWindowManager>();
windowManager.Stub(wm => wm.Register(Arg<string>.Is.Anything, Arg<Action>.Is.Anything, Arg<Location>.Is.Anything))
.Do((Action<string, Action, Location>)((i, a, l) => a()));
menuManager = MockRepository.GenerateStub<IMenuManager>();
windowManager.Stub(wm => wm.MenuManager).Return(menuManager);
annotationsController = MockRepository.GenerateStub<IAnnotationsController>();
sourceCodeController = MockRepository.GenerateStub<ISourceCodeController>();
annotationsPackage = new AnnotationsPackage(windowManager, annotationsController, sourceCodeController);
}
示例3: SetUp
public void SetUp()
{
windowManager = MockRepository.GenerateStub<IWindowManager>();
windowManager.Stub(wm => wm.Register(Arg<string>.Is.Anything, Arg<Action>.Is.Anything, Arg<Location>.Is.Anything))
.Do((Action<string, Action, Location>)((i, a, l) => a()));
menuManager = MockRepository.GenerateStub<IMenuManager>();
windowManager.Stub(wm => wm.MenuManager).Return(menuManager);
menuManager.Stub(mm => mm.Add(Arg<string>.Is.Anything, Arg<Func<MenuCommand>>.Is.Anything))
.Do((Action<string, Func<MenuCommand>>)((m, f) => menuCommand = f()));
var runtimeLogController = MockRepository.GenerateStub<IRuntimeLogController>();
runtimeLogPackage = new RuntimeLogPackage(windowManager, runtimeLogController);
}
示例4: SetUp
public void SetUp()
{
windowManager = MockRepository.GenerateStub<IWindowManager>();
windowManager.Stub(wm => wm.Register(Arg<string>.Is.Anything, Arg<Action>.Is.Anything))
.Do((Action<string, Action>)((i, a) => a()));
menuManager = MockRepository.GenerateStub<IMenuManager>();
windowManager.Stub(wm => wm.MenuManager).Return(menuManager);
filterController = MockRepository.GenerateStub<IFilterController>();
projectController = MockRepository.GenerateStub<IProjectController>();
projectController.Stub(pc => pc.TestFilters).Return(new Observable<IList<FilterInfo>>(new List<FilterInfo>()));
filtersPackage = new FiltersPackage(windowManager, filterController, projectController);
}
示例5: SetUp
public void SetUp()
{
windowManager = TestWindowManager.Create();
menuManager = MockRepository.GenerateStub<IMenuManager>();
windowManager.Stub(wm => wm.MenuManager).Return(menuManager);
menuManager.Stub(mm => mm.Add(Arg<string>.Is.Anything, Arg<Func<MenuCommand>>.Is.Anything))
.Do((Action<string, Func<MenuCommand>>)((m, f) => menuCommand = f()));
var testExplorerController = MockRepository.GenerateStub<ITestExplorerController>();
var testExplorerModel = MockRepository.GenerateStub<ITestExplorerModel>();
package = new TestExplorerPackage(windowManager, testExplorerController, testExplorerModel);
}
示例6: SetUp
public void SetUp()
{
windowManager = TestWindowManager.Create();
menuManager = MockRepository.GenerateStub<IMenuManager>();
windowManager.Stub(wm => wm.MenuManager).Return(menuManager);
menuManager.Stub(mm => mm.Add(Arg<string>.Is.Anything, Arg<Common.Func<MenuCommand>>.Is.Anything))
.Do((Common.Action<string, Common.Func<MenuCommand>>)((m, f) => menuCommand = f()));
var testResultsController = MockRepository.GenerateStub<ITestResultsController>();
var optionsController = MockRepository.GenerateStub<IOptionsController>();
var testTreeModel = MockRepository.GenerateStub<ITestTreeModel>();
var testStatistics = new TestStatistics();
package = new TestResultsPackage(windowManager, testResultsController, optionsController, testTreeModel, testStatistics);
}
示例7: SetUp
public void SetUp()
{
windowManager = TestWindowManager.Create();
menuManager = MockRepository.GenerateStub<IMenuManager>();
windowManager.Stub(wm => wm.MenuManager).Return(menuManager);
menuManager.Stub(mm => mm.Add(Arg<string>.Is.Anything, Arg<Func<MenuCommand>>.Is.Anything))
.Do((Action<string, Func<MenuCommand>>)((m, f) => menuCommand = f()));
var projectController = MockRepository.GenerateStub<IProjectController>();
var reportController = MockRepository.GenerateStub<IReportController>();
var taskManager = MockRepository.GenerateStub<ITaskManager>();
var commandFactory = MockRepository.GenerateStub<ICommandFactory>();
package = new ProjectExplorerPackage(windowManager, projectController, reportController, taskManager, commandFactory);
}