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);
		}
		public TestableUpdatePackageCmdlet(
			FakePackageManagementConsoleHost consoleHost,
			FakeCmdletTerminatingError cmdletTerminatingError)
			: base(consoleHost, cmdletTerminatingError)
		{
			this.FakePackageManagementConsoleHost = consoleHost;
			this.FakeCmdletTerminatingError = cmdletTerminatingError;
		}
		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);
		}
		public TestableInvokeProcessPackageActionsCmdlet(
			PackageActionsToRun actionsToRun,
			FakePackageManagementConsoleHost consoleHost,
			FakeCmdletTerminatingError cmdletTerminatingError)
			: base(actionsToRun, consoleHost, cmdletTerminatingError)
		{
			this.ActionsToRun = actionsToRun;
			this.FakePackageManagementConsoleHost = consoleHost;
			this.FakeCmdletTerminatingError = cmdletTerminatingError;
		}
		public TestableUpdatePackageCmdlet(
			FakeUpdatePackageActionsFactory updatePackageActionsFactory,
			FakePackageManagementConsoleHost consoleHost,
			FakeCmdletTerminatingError cmdletTerminatingError)
			: base(updatePackageActionsFactory, consoleHost, cmdletTerminatingError)
		{
			this.FakeUpdatePackageActionsFactory = updatePackageActionsFactory;
			this.FakePackageManagementConsoleHost = consoleHost;
			this.FakeCmdletTerminatingError = cmdletTerminatingError;
		}
        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;
        }
        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;
        }
		public TestableInvokeUpdateWorkingDirectoryCmdlet(
			FakePackageManagementProjectService projectService,
			FakePackageManagementConsoleHost consoleHost,
			FakeCmdletTerminatingError cmdletTerminatingError)
			: base(projectService, consoleHost, cmdletTerminatingError)
		{
			this.FakeProjectService = projectService;
			this.FakePackageManagementConsoleHost = consoleHost;
			this.FakeCmdletTerminatingError = cmdletTerminatingError;
			
			Solution = new Solution();
			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;
		}
        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 CreateConsoleHost()
 {
     consoleHost = new FakePackageManagementConsoleHost();
 }
		void CreateComponentModel()
		{
			fakeConsoleHost = new FakePackageManagementConsoleHost();
			model = new ComponentModel(fakeConsoleHost);
		}
Esempio n. 16
0
 void CreateComponentModel()
 {
     fakeConsoleHost = new FakePackageManagementConsoleHost();
     fakeSolution = new FakePackageManagementSolution();
     model = new ComponentModel(fakeConsoleHost, fakeSolution);
 }
		void CreateCommand()
		{
			fakeConsoleHost = new FakePackageManagementConsoleHost();
			command = new ClearPackageManagementConsoleHostCommand(fakeConsoleHost);
		}
 void CreateConsoleInitializer()
 {
     fakeConsoleHost = new FakePackageManagementConsoleHost();
     initializer = new ConsoleInitializer(fakeConsoleHost);
 }