void CreateViewModel(FakePackageManagementService packageManagementService) { taskFactory = new FakeTaskFactory(); var messageReporter = new FakeMessageReporter(); viewModel = new RecentPackagesViewModel(packageManagementService, messageReporter, taskFactory); }
void CreateViewModel() { registeredPackageRepositories = new FakeRegisteredPackageRepositories(); taskFactory = new FakeTaskFactory(); var packageViewModelFactory = new FakePackageViewModelFactory(); packageManagementEvents = new PackageManagementEvents(); viewModel = new RecentPackagesViewModel( packageManagementEvents, registeredPackageRepositories, packageViewModelFactory, taskFactory); }
void CreateViewModel(FakeRegisteredPackageRepositories registeredPackageRepositories) { this.registeredPackageRepositories = registeredPackageRepositories; taskFactory = new FakeTaskFactory(); var packageViewModelFactory = new FakePackageViewModelFactory(); packageManagementEvents = new PackageManagementEvents(); viewModel = new RecentPackagesViewModel( new FakePackageManagementSolution(), packageManagementEvents, registeredPackageRepositories, packageViewModelFactory, 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); }