void CreateConsole() { fakeConsoleHost = new FakePackageManagementConsoleHost(); fakeScriptingConsole = new FakeScriptingConsole(); fakeConsoleHost.ScriptingConsole = fakeScriptingConsole; console = new PackageInitializationScriptsConsole(fakeConsoleHost); }
public void CreateFakeWorkbench() { workbench = MockWorkbench.CreateWorkbenchWithOneViewContent("test.py"); fakeConsoleTextEditor = workbench.FakeScriptingConsolePad.FakeConsoleTextEditor; fakeConsole = workbench.FakeScriptingConsolePad.FakeScriptingConsole; fakeTextEditor = workbench.ActiveMockEditableViewContent.MockTextEditor; }
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; }
TestableThreadSafeScriptingConsole(IScriptingConsole nonThreadSafeScriptingConsole, ThreadSafeScriptingConsoleEvents consoleEvents, IControlDispatcher dispatcher) : base(nonThreadSafeScriptingConsole, consoleEvents, dispatcher) { NonThreadSafeScriptingConsole = (FakeScriptingConsole)nonThreadSafeScriptingConsole; ConsoleEvents = (TestableThreadSafeScriptingConsoleEvents)consoleEvents; Dispatcher = (FakeControlDispatcher)dispatcher; ConsoleEvents.Dispatcher = Dispatcher; ConsoleEvents.NonThreadSafeScriptingConsole = NonThreadSafeScriptingConsole; }
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; }