Пример #1
0
 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);
 }
Пример #4
0
 void CreateRunner()
 {
     actionsToRun                     = new PackageActionsToRun();
     fakeConsoleHost                  = new FakePackageManagementConsoleHost();
     fakeScriptingConsole             = new FakeScriptingConsole();
     fakeConsoleHost.ScriptingConsole = fakeScriptingConsole;
     fakeWorkbench                    = new FakePackageManagementWorkbench();
     runner = new ConsolePackageActionRunner(fakeConsoleHost, actionsToRun, fakeWorkbench);
 }
Пример #5
0
 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);
 }
Пример #6
0
        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);
 }
Пример #8
0
 void CreateConsoleHost()
 {
     consoleHost          = new TestablePowerShellMissingConsoleHost();
     fakeScriptingConsole = consoleHost.FakeScriptingConsole;
 }
Пример #9
0
 public TestablePowerShellMissingConsoleHost(FakeScriptingConsole scriptingConsole)
 {
     this.FakeScriptingConsole = scriptingConsole;
     this.ScriptingConsole     = scriptingConsole;
 }