예제 #1
0
        public new async Task CanDownloadFilesAsync()
        {
            QDownloader = GetQueueDownloader();

            await QDownloader.DownloadAsync(GetDefaultSpec());

            VerifyAsyncDownloads();
        }
예제 #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();
        }