void CreateCommandLineWithSolution(string fileName) { IPackageManagementSolution solution = MockRepository.GenerateStub <IPackageManagementSolution>(); solution.Stub(s => s.FileName).Return(fileName); commandLine = new NuGetPackageRestoreCommandLine(solution); }
void CreatePackageInstallerServices() { fakeSolution = MockRepository.GenerateStub <IPackageManagementSolution>(); installedPackages = new List <IPackage>(); fakeSolution.Stub(s => s.GetPackages()).Return(installedPackages.AsQueryable()); installerServices = new VsPackageInstallerServices(fakeSolution); }
void CreatePackageInstallerServices() { fakeSolution = MockRepository.GenerateStub<IPackageManagementSolution>(); installedPackages = new List<IPackage>(); fakeSolution.Stub(s => s.GetPackages()).Return(installedPackages.AsQueryable()); installerServices = new VsPackageInstallerServices(fakeSolution); }
IPackage AddPackage(string id, string version, string installPath) { var package = new FakePackage(id, version); installedPackages.Add(package); fakeSolution.Stub(s => s.GetInstallPath(package)).Return(installPath); return(package); }
void CreateSolution() { projects = new List <IPackageManagementProject>(); sourceRepository = MockRepository.GenerateStub <IPackageRepository>(); solution = MockRepository.GenerateStub <IPackageManagementSolution>(); solution .Stub(s => s.GetProjects(sourceRepository)) .Return(projects); }
void CreateSolution() { projects = new List<IPackageManagementProject>(); sourceRepository = MockRepository.GenerateStub<IPackageRepository>(); solution = MockRepository.GenerateStub<IPackageManagementSolution>(); solution .Stub(s => s.GetProjects(sourceRepository)) .Return(projects); }