public GivenANuGetCachePrimer() { var fileSystemMockBuilder = FileSystemMockBuilder.Create(); fileSystemMockBuilder.TemporaryFolder = TEMPORARY_FOLDER_PATH; fileSystemMockBuilder.AddFile(COMPRESSED_ARCHIVE_PATH); _fileSystemMock = fileSystemMockBuilder.Build(); _temporaryDirectoryMock = (ITemporaryDirectoryMock)_fileSystemMock.Directory.CreateTemporaryDirectory(); _commandFactoryMock = SetupCommandFactoryMock(); _nugetPackagesArchiverMock = new Mock <INuGetPackagesArchiver>(); _nugetPackagesArchiverMock.Setup(n => n.ExtractArchive()).Returns(PACKAGES_ARCHIVE_PATH); _nugetPackagesArchiverMock.Setup(n => n.NuGetPackagesArchive).Returns(COMPRESSED_ARCHIVE_PATH); _nugetCacheSentinel = new Mock <INuGetCacheSentinel>(); var nugetCachePrimer = new NuGetCachePrimer( _commandFactoryMock.Object, _nugetPackagesArchiverMock.Object, _nugetCacheSentinel.Object, _fileSystemMock.Directory, _fileSystemMock.File); nugetCachePrimer.PrimeCache(); }
public GivenANuGetCachePrimer() { var fileSystemMockBuilder = FileSystemMockBuilder.Create(); fileSystemMockBuilder.TemporaryFolder = TEMPORARY_FOLDER_PATH; fileSystemMockBuilder.AddFile(COMPRESSED_ARCHIVE_PATH); _fileSystemMock = fileSystemMockBuilder.Build(); _temporaryDirectoryMock = (ITemporaryDirectoryMock)_fileSystemMock.Directory.CreateTemporaryDirectory(); _commandFactoryMock = SetupCommandFactoryMock(); _nugetPackagesArchiverMock = new Mock<INuGetPackagesArchiver>(); _nugetPackagesArchiverMock.Setup(n => n.ExtractArchive()).Returns(PACKAGES_ARCHIVE_PATH); _nugetPackagesArchiverMock.Setup(n => n.NuGetPackagesArchive).Returns(COMPRESSED_ARCHIVE_PATH); _nugetCacheSentinel = new Mock<INuGetCacheSentinel>(); var nugetCachePrimer = new NuGetCachePrimer( _commandFactoryMock.Object, _nugetPackagesArchiverMock.Object, _nugetCacheSentinel.Object, _fileSystemMock.Directory, _fileSystemMock.File); nugetCachePrimer.PrimeCache(); }