public async Task ShouldDownloadPage()
        {
            using (var client = new HttpClient())
            {
                var downloader = new CancellationsPageDownloader(client);

                var bytes = await downloader.DownloadAsync()
                            .ConfigureAwait(false);

                var result = System.Text.Encoding.UTF8.GetString(bytes);

                result.Should().Contain("Forthcoming cancellations in the UK");
            }
        }
Exemple #2
0
 public DownloadCancellationsPageFunction(CancellationsPageDownloader cancellationsPageDownloader, Func <ILogger, CloudBlockBlobUpdater> cloudBlockBlobUpdater, ILogger logger)
 {
     _cancellationsPageDownloader = cancellationsPageDownloader;
     _cloudBlockBlobUpdater       = cloudBlockBlobUpdater(logger);
 }