예제 #1
0
        public async Task Compress_ShouldZipFolder()
        {
            var textFilePath = Path.Combine(sourceDirectoryPath, "compress.txt");
            await File.WriteAllTextAsync(textFilePath, "Compress test.");

            zipFilePath = await fileZipper.Compress(sourceDirectoryPath);

            Debugger.Break();

            FileAssert.Exists(zipFilePath);
            FileAssert.ZipHasFiles(zipFilePath, expectedFileCount: 1);
        }
예제 #2
0
 private void compressFile()
 {
     if (IsZipFile)
     {
         LogWriter.LogInfo("ExportCommand: Compressing the file");
         FileZipper.Compress(new FileInfo(FileName));
     }
 }