void CreateConsole()
 {
     fakeConsoleHost                  = new FakePackageManagementConsoleHost();
     fakeScriptingConsole             = new FakeScriptingConsole();
     fakeConsoleHost.ScriptingConsole = fakeScriptingConsole;
     console = new PackageInitializationScriptsConsole(fakeConsoleHost);
 }
 public TestableInstallPackageCmdlet(
     FakePackageManagementConsoleHost consoleHost,
     FakeCmdletTerminatingError cmdletTerminatingError)
     : base(consoleHost, cmdletTerminatingError)
 {
     this.FakePackageManagementConsoleHost = consoleHost;
     this.FakeCmdletTerminatingError       = cmdletTerminatingError;
 }
 void CreateReset()
 {
     fakeProjectService               = new FakePackageManagementProjectService();
     fakeConsoleHost                  = new FakePackageManagementConsoleHost();
     fakeScriptingConsole             = new FakeScriptingConsole();
     fakeConsoleHost.ScriptingConsole = fakeScriptingConsole;
     reset = new ResetPowerShellWorkingDirectoryOnSolutionClosed(fakeProjectService, fakeConsoleHost);
 }
Beispiel #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);
 }
 public TestableInvokeProcessPackageActionsCmdlet(
     PackageActionsToRun actionsToRun,
     FakePackageManagementConsoleHost consoleHost,
     FakeCmdletTerminatingError cmdletTerminatingError)
     : base(actionsToRun, consoleHost, cmdletTerminatingError)
 {
     this.ActionsToRun = actionsToRun;
     this.FakePackageManagementConsoleHost = consoleHost;
     this.FakeCmdletTerminatingError       = cmdletTerminatingError;
 }
Beispiel #6
0
 public TestableUpdatePackageCmdlet(
     FakeUpdatePackageActionsFactory updatePackageActionsFactory,
     FakePackageManagementConsoleHost consoleHost,
     FakeCmdletTerminatingError cmdletTerminatingError)
     : base(updatePackageActionsFactory, consoleHost, cmdletTerminatingError)
 {
     this.FakeUpdatePackageActionsFactory  = updatePackageActionsFactory;
     this.FakePackageManagementConsoleHost = consoleHost;
     this.FakeCmdletTerminatingError       = cmdletTerminatingError;
 }
Beispiel #7
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);
 }
Beispiel #8
0
 public TestableGetProjectCmdlet(
     FakePackageManagementConsoleHost consoleHost,
     FakeCommandRuntime commandRuntime,
     FakeCmdletTerminatingError cmdletTerminatingError)
     : base(consoleHost, cmdletTerminatingError)
 {
     this.FakePackageManagementConsoleHost = consoleHost;
     this.FakeCommandRuntime         = commandRuntime;
     this.CommandRuntime             = commandRuntime;
     this.FakeCmdletTerminatingError = cmdletTerminatingError;
     this.FakeSolution = consoleHost.FakeSolution;
 }
Beispiel #9
0
 public TestableGetPackageCmdlet(
     FakeRegisteredPackageRepositories registeredPackageRepositories,
     FakePackageManagementConsoleHost consoleHost,
     FakeCommandRuntime commandRuntime,
     FakeCmdletTerminatingError terminatingError)
     : base(registeredPackageRepositories, consoleHost, terminatingError)
 {
     this.FakeRegisteredPackageRepositories = registeredPackageRepositories;
     this.FakePackageManagementConsoleHost  = consoleHost;
     this.FakeCommandRuntime         = commandRuntime;
     this.CommandRuntime             = commandRuntime;
     this.FakeCmdletTerminatingError = terminatingError;
 }
Beispiel #10
0
        public TestableInvokeUpdateWorkingDirectoryCmdlet(
            FakePackageManagementProjectService projectService,
            FakePackageManagementConsoleHost consoleHost,
            FakeCmdletTerminatingError cmdletTerminatingError)
            : base(projectService, consoleHost, cmdletTerminatingError)
        {
            this.FakeProjectService = projectService;
            this.FakePackageManagementConsoleHost = consoleHost;
            this.FakeCmdletTerminatingError       = cmdletTerminatingError;

            Solution                    = new Solution(new MockProjectChangeWatcher());
            Solution.FileName           = @"d:\projects\MyProject\MyProject.sln";
            projectService.OpenSolution = Solution;
        }
        public TestableInvokeInitializePackagesCmdlet(
            FakePackageManagementProjectService projectService,
            FakePackageInitializationScriptsFactory scriptsFactory,
            FakePackageManagementConsoleHost consoleHost,
            FakeCmdletTerminatingError cmdletTerminatingError)
            : base(projectService, scriptsFactory, consoleHost, cmdletTerminatingError)
        {
            this.FakeProjectService = projectService;
            this.FakeScriptsFactory = scriptsFactory;
            this.FakePackageManagementConsoleHost = consoleHost;
            this.FakeCmdletTerminatingError       = cmdletTerminatingError;

            Solution                    = new Solution(new MockProjectChangeWatcher());
            Solution.FileName           = @"d:\projects\MyProject\MyProject.sln";
            projectService.OpenSolution = Solution;
        }
        public TestableInvokeInitializePackagesCmdlet(
            FakePackageManagementProjectService projectService,
            FakePackageInitializationScriptsFactory scriptsFactory,
            FakePackageManagementConsoleHost consoleHost,
            FakeCmdletTerminatingError cmdletTerminatingError)
            : base(projectService, scriptsFactory, consoleHost, cmdletTerminatingError)
        {
            this.FakeProjectService = projectService;
            this.FakeScriptsFactory = scriptsFactory;
            this.FakePackageManagementConsoleHost = consoleHost;
            this.FakeCmdletTerminatingError       = cmdletTerminatingError;

            Solution = MockRepository.GenerateStub <ISolution>();
            Solution.Stub(s => s.FileName).Return(new FileName(@"d:\projects\MyProject\MyProject.sln"));
            projectService.OpenSolution = Solution;
        }
Beispiel #13
0
        public TestableInvokeUpdateWorkingDirectoryCmdlet(
            string solutionFileName,
            FakePackageManagementProjectService projectService,
            FakePackageManagementConsoleHost consoleHost,
            FakeCmdletTerminatingError cmdletTerminatingError)
            : base(projectService, consoleHost, cmdletTerminatingError)
        {
            this.FakeProjectService = projectService;
            this.FakePackageManagementConsoleHost = consoleHost;
            this.FakeCmdletTerminatingError       = cmdletTerminatingError;

            Solution = MockRepository.GenerateStub <ISolution>();
            var fileName = new FileName(solutionFileName);

            Solution.Stub(s => s.Directory).Return(fileName.GetParentDirectory());
            Solution.Stub(s => s.FileName).Return(fileName);
            projectService.OpenSolution = Solution;
        }
 void CreateConsoleInitializer()
 {
     fakeConsoleHost = new FakePackageManagementConsoleHost();
     initializer     = new ConsoleInitializer(fakeConsoleHost);
 }
Beispiel #15
0
 void CreateCommand()
 {
     fakeConsoleHost = new FakePackageManagementConsoleHost();
     command         = new ClearPackageManagementConsoleHostCommand(fakeConsoleHost);
 }
		void CreateComponentModel()
		{
			fakeConsoleHost = new FakePackageManagementConsoleHost();
			model = new ComponentModel(fakeConsoleHost);
		}
Beispiel #17
0
 void CreateConsoleHost()
 {
     consoleHost = new FakePackageManagementConsoleHost();
 }
 void CreateComponentModel()
 {
     fakeConsoleHost = new FakePackageManagementConsoleHost();
     fakeSolution    = new FakePackageManagementSolution();
     model           = new ComponentModel(fakeConsoleHost, fakeSolution);
 }