public void CreateFakeWorkbench() { workbench = MockWorkbench.CreateWorkbenchWithOneViewContent("test.py"); fakeConsoleTextEditor = workbench.FakeScriptingConsolePad.FakeConsoleTextEditor; fakeConsole = workbench.FakeScriptingConsolePad.FakeScriptingConsole; fakeTextEditor = workbench.ActiveMockEditableViewContent.MockTextEditor; }
void CreateConsole() { fakeConsoleHost = new FakePackageManagementConsoleHost(); fakeScriptingConsole = new FakeScriptingConsole(); fakeConsoleHost.ScriptingConsole = fakeScriptingConsole; console = new PackageInitializationScriptsConsole(fakeConsoleHost); }
void CreateReset() { fakeProjectService = new FakePackageManagementProjectService(); fakeConsoleHost = new FakePackageManagementConsoleHost(); fakeScriptingConsole = new FakeScriptingConsole(); fakeConsoleHost.ScriptingConsole = fakeScriptingConsole; reset = new ResetPowerShellWorkingDirectoryOnSolutionClosed(fakeProjectService, fakeConsoleHost); }
void CreateRunner() { actionsToRun = new PackageActionsToRun(); fakeConsoleHost = new FakePackageManagementConsoleHost(); fakeScriptingConsole = new FakeScriptingConsole(); fakeConsoleHost.ScriptingConsole = fakeScriptingConsole; fakeWorkbench = new FakePackageManagementWorkbench(); runner = new ConsolePackageActionRunner(fakeConsoleHost, actionsToRun, fakeWorkbench); }
void CreateRunner() { fakeProjectService = new FakePackageManagementProjectService(); fakeConsoleHost = new FakePackageManagementConsoleHost(); fakeScriptingConsole = new FakeScriptingConsole(); fakeConsoleHost.ScriptingConsole = fakeScriptingConsole; scriptsConsole = new PackageInitializationScriptsConsole(fakeConsoleHost); fakeScriptsFactory = new FakePackageInitializationScriptsFactory(); runner = new RunPackageInitializationScriptsOnSolutionOpen(fakeProjectService, scriptsConsole, fakeScriptsFactory); }
void CreateThreadSafeScriptingConsole() { threadSafeConsole = new TestableThreadSafeScriptingConsole(); dispatcher = threadSafeConsole.Dispatcher; dispatcher.CheckAccessReturnValue = true; nonThreadSafeScriptingConsole = threadSafeConsole.NonThreadSafeScriptingConsole; threadSafeConsoleEvents = threadSafeConsole.ConsoleEvents; }
void CreateHostUserInterface() { scriptingConsole = new FakeScriptingConsole(); hostUI = new PowerShellHostUserInterface(scriptingConsole); }
void CreateConsoleHost() { consoleHost = new TestablePowerShellMissingConsoleHost(); fakeScriptingConsole = consoleHost.FakeScriptingConsole; }
public TestablePowerShellMissingConsoleHost(FakeScriptingConsole scriptingConsole) { this.FakeScriptingConsole = scriptingConsole; this.ScriptingConsole = scriptingConsole; }