void CreatePackageManager (IProject project, PackageReferenceRepositoryHelper packageRefRepositoryHelper)
		{
			options = new TestablePackageManagementOptions ();
			options.PackagesDirectory = "packages";

			repositoryPaths = new SolutionPackageRepositoryPath (project, options);
			var pathResolver = new DefaultPackagePathResolver (repositoryPaths.PackageRepositoryPath);

			fakeFileSystem = new FakeFileSystem ();

			fakeFeedSourceRepository = new FakePackageRepository ();
			fakeSolutionSharedRepository = packageRefRepositoryHelper.FakeSharedSourceRepository;

			fakePackageOperationResolverFactory = new FakePackageOperationResolverFactory ();
			fakePackageOperationResolver = fakePackageOperationResolverFactory.FakeInstallPackageOperationResolver;

			var fakeSolutionPackageRepository = new FakeSolutionPackageRepository ();
			fakeSolutionPackageRepository.FileSystem = fakeFileSystem;
			fakeSolutionPackageRepository.PackagePathResolver = pathResolver;
			fakeSolutionPackageRepository.FakeSharedRepository = fakeSolutionSharedRepository;

			packageManager = new MonoDevelopPackageManager (fakeFeedSourceRepository,
				packageRefRepositoryHelper.FakeProjectSystem,
				fakeSolutionPackageRepository,
				fakePackageOperationResolverFactory);
		}
		public void CreatedSharedRepository_ConfigSettingsFileSystemPassed_FileSystemUsedToCreatedSharedRepository ()
		{
			CreateCache ();
			FakeFileSystem fileSystem = new FakeFileSystem ();
			cache.CreateSharedRepository (null, null, fileSystem);

			Assert.AreEqual (fileSystem, fakePackageRepositoryFactory.ConfigSettingsFileSystemPassedToCreateSharedRepository);
		}
		void AssertPackageMarkedForReinstallationInPackagesConfigFile (string packageId, bool expectedReinstallationSetting)
		{
			var fileSystem = new FakeFileSystem ();
			fileSystem.FileExistsReturnValue = true;
			MemoryStream stream = runner.FileSystem.FilesAdded.First ().Value;
			string file = UTF8Encoding.UTF8.GetString (stream.ToArray ());
			fileSystem.FileToReturnFromOpenFile = file;
			var packageReferenceFile = new PackageReferenceFile (fileSystem, "packages.config");
			PackageReference matchedReference = packageReferenceFile
				.GetPackageReferences ()
				.FirstOrDefault (packageReference => packageReference.Id == packageId);

			Assert.AreEqual (expectedReinstallationSetting, matchedReference.RequireReinstallation);
		}
		public void ExtractPath_WrappedPackage_WrappedPackageExtractContentsCalled ()
		{
			CreatePackage ();
			var expectedFileSystem = new FakeFileSystem ();
			string expectedPath = @"d:\projects\test\packages";

			package.ExtractContents (expectedFileSystem, expectedPath);

			Assert.AreEqual (expectedFileSystem, fakePackage.FileSystemPassedToExtractContents);
			Assert.AreEqual (expectedPath, fakePackage.ExtractPathPassedToExtractContents);
		}
		FakeFileSystem CreateFileSystem ()
		{
			fileSystem = new FakeFileSystem ();
			return fileSystem;
		}