void CreateSolution ()
		{
			packageManagementEvents = new PackageManagementEvents ();
			fakeProject = new FakePackageManagementProject ();
			action = new UpdatePackageAction (fakeProject, packageManagementEvents);
			updatePackageHelper = new UpdatePackageHelper (action);
		}
		void CreateSolution ()
		{
			packageManagerFactory = new FakePackageManagerFactory ();
			packageRepositoryCache = new FakePackageRepositoryFactory ();
			packageEvents = new PackageManagementEvents ();
			solution = new FakePackageManagementSolution ();
		}
		void CreateAction ()
		{
			packageManagementEvents = new PackageManagementEvents ();
			fakeProject = new FakePackageManagementProject ();
			action = new InstallPackageAction (fakeProject, packageManagementEvents);
			installPackageHelper = new InstallPackageHelper (action);
		}
		void CreateAction ()
		{
			packageManagementEvents = new PackageManagementEvents ();
			fakeProject = new FakePackageManagementProject ();
			fileRemover = new FakeFileRemover ();
			action = new TestableInstallPackageAction (fakeProject, packageManagementEvents, fileRemover);
			installPackageHelper = new InstallPackageHelper (action);
		}
		void CreateSolution ()
		{
			packageManagementEvents = new PackageManagementEvents ();
			fakeProject = new FakePackageManagementProject ();
			fileRemover = new FakeFileRemover ();
			action = new TestableUpdatePackageAction (fakeProject, packageManagementEvents, fileRemover);
			updatePackageHelper = new UpdatePackageHelper (action);
		}
		public TestableProcessPackageAction (
			FakePackageManagementProject project,
			PackageManagementEvents packageManagementEvents)
			: base (project, packageManagementEvents)
		{
			FakeProject = project;
			PackageManagementEvents = packageManagementEvents;
			this.Package = FakePackage;
		}
		void CreateLogger ()
		{
			messagesLoggedEventArgs = new List<PackageOperationMessageLoggedEventArgs> ();
			packageManagementEvents = new PackageManagementEvents ();
			packageManagementEvents.PackageOperationMessageLogged += (sender, e) => {
				messagesLoggedEventArgs.Add (e);
			};

			logger = new PackageManagementLogger (packageManagementEvents);
		}
		void CreateViewModel (FakePackageManagementSolution solution)
		{
			viewModelParent = CreateViewModelParent ();
			viewModel = new TestablePackageViewModel (viewModelParent, solution);
			fakePackage = viewModel.FakePackage;
			this.fakeSolution = solution;
			packageManagementEvents = viewModel.PackageManagementEvents;
			fakeLogger = viewModel.FakeLogger;
			fakeUninstallPackageAction = solution.FakeProjectToReturnFromGetProject.FakeUninstallPackageAction;
		}
		void CreateUpdatedPackagesInSolution ()
		{
			solution = new FakePackageManagementSolution ();
			registeredPackageRepositories = new FakeRegisteredPackageRepositories ();
			packageManagementEvents = new PackageManagementEvents ();
			updatedPackagesInSolution = new TestableUpdatedPackagesInSolution (
				solution,
				registeredPackageRepositories,
				packageManagementEvents);
		}
		void CreateAction (string packageId = "MyPackage", string packageVersion = "1.2.3.4")
		{
			project = new FakePackageManagementProject ();
			FakePackageOperation operation = project.AddFakeInstallOperation ();

			packageManagementEvents = new PackageManagementEvents ();

			action = new ReinstallPackageAction (project, packageManagementEvents);
			action.PackageId = packageId;
			action.PackageVersion = new SemanticVersion (packageVersion);
		}
		void CreateViewModel()
		{
			registeredPackageRepositories = new FakeRegisteredPackageRepositories();
			taskFactory = new FakeTaskFactory();
			var packageViewModelFactory = new FakePackageViewModelFactory();
			packageManagementEvents = new PackageManagementEvents();
			viewModel = new RecentPackagesViewModel(
				packageManagementEvents,
				registeredPackageRepositories,
				packageViewModelFactory,
				taskFactory);
		}
 void CreateProvider()
 {
     fakeSolution = new FakePackageManagementSolution();
     fakeRegisteredRepositories = new FakeRegisteredPackageRepositories();
     fakePowerShellDetection = new FakePowerShellDetection();
     packageEvents = new PackageManagementEvents();
     provider = new PackageManagementConsoleHostProvider(
         fakeSolution,
         fakeRegisteredRepositories,
         fakePowerShellDetection,
         packageEvents);
 }
		void CreateViewModel(FakeRegisteredPackageRepositories registeredPackageRepositories)
		{
			this.registeredPackageRepositories = registeredPackageRepositories;
			taskFactory = new FakeTaskFactory();
			var packageViewModelFactory = new FakePackageViewModelFactory();
			packageManagementEvents = new PackageManagementEvents();
			viewModel = new TestableRecentPackagesViewModel(
				new FakePackageManagementSolution(),
				packageManagementEvents,
				registeredPackageRepositories,
				packageViewModelFactory,
				taskFactory);
		}
		TestableMonoDevelopProjectSystem (
			IDotNetProject project,
			IPackageManagementFileService fileService,
			IPackageManagementProjectService projectService,
			PackageManagementEvents packageManagementEvents,
			FakeLogger logger)
			: base (project, fileService, projectService, packageManagementEvents, GuiSyncDispatcher)
		{
			FakeFileService = (FakeFileService)fileService;
			FakeProjectService = (FakePackageManagementProjectService)projectService;
			PackageManagementEvents = packageManagementEvents;
			Logger = logger;
		}
		void CreateProject (IPackageRepository sourceRepository)
		{
			fakePackageManagerFactory = new FakePackageManagerFactory ();
			fakePackageManager = fakePackageManagerFactory.FakePackageManager;
			fakeProjectManager = fakePackageManager.FakeProjectManager;
			fakeProject = new FakeDotNetProject ();
			packageManagementEvents = new PackageManagementEvents ();

			project = new PackageManagementProject (
				sourceRepository,
				fakeProject,
				packageManagementEvents,
				fakePackageManagerFactory);
		}
		void CreateViewModel(FakePackageManagementSolution solution)
		{
			registeredPackageRepositories = new FakeRegisteredPackageRepositories();
			var packageViewModelFactory = new FakePackageViewModelFactory();
			taskFactory = new FakeTaskFactory();
			packageManagementEvents = new PackageManagementEvents();
			
			viewModel = new InstalledPackagesViewModel(
				solution,
				packageManagementEvents,
				registeredPackageRepositories,
				packageViewModelFactory,
				taskFactory);
		}
		void CreateUpdatedPackagesInSolution ()
		{
			solution = new FakePackageManagementSolution ();
			registeredPackageRepositories = new FakeRegisteredPackageRepositories ();
			packageManagementEvents = new PackageManagementEvents ();
			taskFactory = new FakeTaskFactory ();
			taskFactory.RunTasksSynchronously = true;
			progressMonitorFactory = new FakeProgressMonitorFactory ();
			checkForUpdatesTaskRunner = new TestableCheckForUpdatesTaskRunner (taskFactory);
			updatedPackagesInSolution = new TestableUpdatedPackagesInSolution (
				solution,
				registeredPackageRepositories,
				packageManagementEvents,
				checkForUpdatesTaskRunner);
		}
		void CreateViewModelWithRealPackageManagementEvents()
		{
			CreateSolution();
			CreateRegisteredPackageRepositories();
			packageManagementEvents = new PackageManagementEvents();
			var actionRunner = new FakePackageActionRunner();
			var packageViewModelFactory = new PackageViewModelFactory(solution, packageManagementEvents, actionRunner);
			updatedPackageViewModelFactory = new UpdatedPackageViewModelFactory(packageViewModelFactory);
			taskFactory = new FakeTaskFactory();
			
			viewModel = new UpdatedPackagesViewModel(
				solution,
				registeredPackageRepositories,
				updatedPackageViewModelFactory,
				taskFactory);
		}
		void CreateRunner ()
		{
			actions = new List<IPackageAction> ();
			progressMessage = new ProgressMonitorStatusMessage ("Status", "Success", "Error", "Warning");
			packageManagementEvents = new PackageManagementEvents ();
			progressMonitorFactory = new FakeProgressMonitorFactory ();
			progressMonitor = progressMonitorFactory.ProgressMonitor;
			repositoryFactoryEvents = new FakePackageRepositoryFactoryEvents ();
			progressProvider = new PackageManagementProgressProvider (repositoryFactoryEvents, handler => {
				handler.Invoke ();
			});

			runner = new TestableBackgroundPackageActionRunner (
				progressMonitorFactory,
				packageManagementEvents,
				progressProvider);
		}
		public TestablePackageViewModel (
			IPackageViewModelParent parent,
			FakePackage package,
			PackageManagementSelectedProjects selectedProjects,
			PackageManagementEvents packageManagementEvents,
			FakeLogger logger)
			: base (
				parent,
				package,
				selectedProjects,
				packageManagementEvents,
				null,
				logger)
		{
			this.FakePackage = package;
			this.PackageManagementEvents = packageManagementEvents;
			this.FakeLogger = logger;
		}
		void CreateRunner ()
		{
			project = new FakeDotNetProject (@"d:\projects\MyProject\MyProject.csproj");
			project.Name = "MyProject";
			project.TargetFrameworkMoniker = new TargetFrameworkMoniker ("4.5");
			solution = new FakePackageManagementSolution ();
			registeredRepositories = new FakeRegisteredPackageRepositories ();
			progressMonitorFactory = new FakeProgressMonitorFactory ();
			progressMonitor = progressMonitorFactory.ProgressMonitor;
			packageManagementEvents = new PackageManagementEvents ();

			repositoryFactoryEvents = new FakePackageRepositoryFactoryEvents ();
			progressProvider = new PackageManagementProgressProvider (repositoryFactoryEvents, handler => {
				handler.Invoke ();
			});

			runner = new TestablePackageCompatibilityRunner (
				project,
				solution,
				registeredRepositories,
				progressMonitorFactory,
				packageManagementEvents,
				progressProvider);
		}
 void CreateView(FakeCompilerMessageView fakeCompilerMessageView)
 {
     packageManagementEvents = new PackageManagementEvents();
     view = new PackageManagementOutputMessagesView(fakeCompilerMessageView, packageManagementEvents);
 }
 void CreateEvents()
 {
     packages = new List<FakePackage>();
     events = new PackageManagementEvents();
 }
		void CreateViewModel(FakePackageManagementSolution solution)
		{
			packageManagementEvents = new PackageManagementEvents();
			var threadSafeEvents = new ThreadSafePackageManagementEvents(packageManagementEvents, new FakePackageManagementWorkbench());
			CreateViewModel(fakeSolution, threadSafeEvents);
		}
		void CreateEventsWithRealPackageManagementEvents()
		{
			unsafeEvents = new PackageManagementEvents();
			fakeWorkbench = new FakePackageManagementWorkbench();
			threadSafeEvents = new ThreadSafePackageManagementEvents(unsafeEvents, fakeWorkbench);
		}
		void CreateEvents ()
		{
			isGuiSyncDispatchCalled = false;
			unsafeEvents = new PackageManagementEvents ();
			threadSafeEvents = new ThreadSafePackageManagementEvents (unsafeEvents, RunGuiSyncDispatch);
		}
		void CreateProjectBrowserRefresher()
		{
			fakeProjectService = new FakePackageManagementProjectService();
			packageManagementEvents = new PackageManagementEvents();
			projectBrowserRefresher = new ProjectBrowserRefresher(fakeProjectService, packageManagementEvents);
		}
		void CreateAction ()
		{
			project = new FakePackageManagementProject ();
			packageManagementEvents = new PackageManagementEvents ();
			action = new ReinstallProjectPackagesAction (project, packageManagementEvents);
		}
 void CreateConsoleHostLogger()
 {
     cmdletLogger = new FakeCmdletLogger();
     packageEvents = new PackageManagementEvents();
     consoleHostLogger = new PackageManagementConsoleHostLogger(cmdletLogger, packageEvents);
 }
 void CreateRepository(IList<RecentPackageInfo> recentPackages)
 {
     packageManagementEvents = new PackageManagementEvents();
     repository = new RecentPackageRepository(recentPackages, aggregateRepository, packageManagementEvents);
 }