Exemplo n.º 1
0
        public void BasicTest()
        {
            const string url = "https://www.example.com/";

            var downloader = new DefaultDownloader();

            if (!downloader.TryDownloadToString(url, out var result))
            {
                Assert.True(false, $"download failed. url: {url}");
            }
            Assert.Contains("Example Domain", result);
        }
Exemplo n.º 2
0
 public EpisodeDownloader
 (
     IOptions <Configuration> configuration,
     ILogger <EpisodeDownloader> logger,
     IFileService fileService,
     IDownloadService downloadService,
     IHistoryService historyService,
     IEnumerable <IEpisodeProvider> episodeProviders,
     DefaultDownloader defaultDownloader
 )
 {
     _configuration     = configuration.Value;
     _logger            = logger;
     _fileService       = fileService;
     _downloadService   = downloadService;
     _historyService    = historyService;
     _episodeProviders  = episodeProviders;
     _defaultDownloader = defaultDownloader;
 }