void CreateViewModel(FakePackageManagementSolution solution, FakeRegisteredPackageRepositories registeredPackageRepositories)
        {
            taskFactory = new FakeTaskFactory();
            var packageViewModelFactory        = new FakePackageViewModelFactory();
            var updatedPackageViewModelFactory = new UpdatedPackageViewModelFactory(packageViewModelFactory);

            viewModel = new UpdatedPackagesViewModel(
                solution,
                registeredPackageRepositories,
                updatedPackageViewModelFactory,
                taskFactory);
        }
 void CreateViewModel(
     FakePackageManagementSolution solution,
     FakeRegisteredPackageRepositories registeredPackageRepositories,
     FakePackageViewModelFactory packageViewModelFactory)
 {
     taskFactory = new FakeTaskFactory();
     this.packageViewModelFactory   = packageViewModelFactory;
     fakePackageManagementEvents    = packageViewModelFactory.FakePackageManagementEvents;
     updatedPackageViewModelFactory = new UpdatedPackageViewModelFactory(packageViewModelFactory);
     viewModel = new UpdatedPackagesViewModel(
         solution,
         registeredPackageRepositories,
         updatedPackageViewModelFactory,
         taskFactory);
 }
        public TestablePackagesViewModels(
            IPackageManagementSolution solution,
            IRegisteredPackageRepositories registeredPackageRepositories,
            IThreadSafePackageManagementEvents packageManagementEvents,
            IPackageActionRunner actionRunner,
            ITaskFactory taskFactory)
        {
            var packageViewModelFactory        = new PackageViewModelFactory(solution, packageManagementEvents, actionRunner);
            var updatedPackageViewModelFactory = new UpdatedPackageViewModelFactory(packageViewModelFactory);

            AvailablePackagesViewModel = new AvailablePackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, packageViewModelFactory, taskFactory);
            InstalledPackagesViewModel = new InstalledPackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, packageViewModelFactory, taskFactory);
            UpdatedPackagesViewModel   = new UpdatedPackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, updatedPackageViewModelFactory, taskFactory);
            RecentPackagesViewModel    = new RecentPackagesViewModel(solution, packageManagementEvents, registeredPackageRepositories, packageViewModelFactory, taskFactory);
        }
        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);
        }