public void ShouldWorkWithFileNodeBackupService()
 {
     var fs = new DryRunFileSystem();
     var driveService = new DryRunDriveService();
     IDownloader downloader = new Downloader(driveService, fs);
     FileNodeBackupService service = new FileNodeBackupService(downloader);
     service.Backup(Utils.MockFileNode("file1", "file1.txt", "text/plain"), "/temp");
     Assert.AreEqual(1, ((DryRunFileBase)fs.File).CreateCount);
 }
 public void ShouldHavePath()
 {
     var fs = new DryRunFileSystem();
     Assert.IsNotNull(fs.Path);
 }
 public void ShouldHaveDirectory()
 {
     var fs = new DryRunFileSystem();
     Assert.IsNotNull(fs.Directory);
 }
 public void ShouldHaveFile()
 {
     var fs = new DryRunFileSystem();
     Assert.IsNotNull(fs.File);
 }
        public int CountExportFiles(IFileNode fileNode)
        {
            DryRunFileSystem mockFileSystem = new DryRunFileSystem();
            DryRunDriveService mockDriveService = new DryRunDriveService();
            IFileSystem oldFileSystem = FileSystem;
            IDriveService oldDriveService = Downloader.DriveService;
            try
            {
                Downloader.DriveService = mockDriveService;
                Downloader.FileSystem = mockFileSystem;

                Backup(fileNode, null);
                return ((DryRunFileBase)mockFileSystem.File).CreateCount;
            }
            finally
            {
                Downloader.DriveService = oldDriveService;
                Downloader.FileSystem = oldFileSystem;
            }
        }