public ProgramIntegrationTests(ITestOutputHelper output) { Program.WriteLine = s => output.WriteLine(s); _testDir = new TestDirectory(); _dataDir = Path.Combine(_testDir, "data"); _dd = new DataDirectoryHelper(_dataDir, DownloadDepth.CatalogLeaf, "api.nuget.org"); }
public DownloadCommandHandlerIntegrationTests( ITestOutputHelper output, DefaultWebApplicationFactory <StaticFilesStartup> factory) { _logger = new DepthLogger(new TestLogger(output)); _factory = factory; _testDir = new TestDirectory(); _dataDir = Path.Combine(_testDir, "data"); _webRoot = Path.Combine(_testDir, "wwwroot"); _builder = _factory.WithWebHostBuilder(b => b .ConfigureLogging(b => b.SetMinimumLevel(LogLevel.Error)) .UseContentRoot(Directory.GetCurrentDirectory()) .UseWebRoot(_webRoot)); _paths = _builder.Services.GetRequiredService <ConcurrentQueue <string> >(); _httpClient = _builder.CreateClient(); _dd = new DataDirectoryHelper(_dataDir, DownloadDepth.CatalogLeaf, "localhost"); }