예제 #1
0
        public void CanUploadLocalFile()
        {
            Strategy.Upload(new FileUploadSpec("c:/d", "file://c:/a/d"));

            A.CallTo(() => _fileCopy.CopyFile("C:\\d".ToAbsoluteFilePath(), "c:/a/d".ToAbsoluteFilePath()))
            .MustHaveHappened(Repeated.Exactly.Once);
        }
 public override void Download(TransferSpec spec)
 {
     spec.Progress.Tries++;
     ConfirmSchemeSupported(spec.Uri.Scheme);
     _fileCopy.CopyFile(GetPathFromUri(spec), spec.LocalFile);
     VerifyIfNeeded(spec, spec.LocalFile);
 }
 public override void Upload(TransferSpec spec)
 {
     spec.Progress.Tries++;
     ConfirmSchemeSupported(spec.Uri.Scheme);
     _fileCopy.CopyFile(spec.LocalFile, GetPathFromUri(spec));
 }