Esempio n. 1
0
        public new async Task CanDownloadFilesAsync()
        {
            QDownloader = GetQueueDownloader();

            await QDownloader.DownloadAsync(GetDefaultSpec());

            VerifyAsyncDownloads();
        }
Esempio n. 2
0
        public new void CanCancelDownloadFilesAsync()
        {
            var token = new CancellationTokenSource();

            QDownloader = GetQueueDownloader();
            token.Cancel();

            Func <Task> act = () => QDownloader.DownloadAsync(GetDefaultSpec(), token.Token);

            act.ShouldThrow <OperationCanceledException>();
            token.Dispose();
        }