public async Task CanUploadRsyncAsync() { await Strategy.UploadAsync(new FileUploadSpec("b", new Uri("rsync://host/b"))); A.CallTo(() => _rsyncLauncher.RunAndProcessAsync(A <ITransferProgress> ._, "b", "rsync://host/b", null)) .MustHaveHappened(Repeated.Exactly.Once); }
public override async Task UploadAsync(TransferSpec spec) { spec.Progress.Tries++; ConfirmSchemeSupported(spec.Uri.Scheme); ProcessExitResult( await _rsyncLauncher.RunAndProcessAsync(spec.Progress, spec.LocalFile.ToString(), spec.Uri.ToString()) .ConfigureAwait(false), spec); }
public override async Task DownloadAsync(TransferSpec spec) { spec.Progress.Tries++; ConfirmSchemeSupported(spec.Uri.Scheme); ProcessExitResult( await _rsyncLauncher.RunAndProcessAsync(spec.Progress, spec.Uri.ToString(), spec.LocalFile.ToString(), spec.CancellationToken) .ConfigureAwait(false), spec); VerifyIfNeeded(spec, spec.LocalFile); }