Example #1
0
        private async Task Run(CloudBlockBlob blob)
        {
            var bytes = await _cancellationsPageDownloader.DownloadAsync()
                        .ConfigureAwait(false);

            await _cloudBlockBlobUpdater.UpdateAsync(blob, bytes);
        }
        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");
            }
        }