Example #1
0
 public void Compress_ToTargetFile()
 {
     using (new TestFolderProvider())
     {
         FileCompresser.CompressFolder(_testFolder, _targetFile);
         Assert.True(File.Exists(_targetFile));
     }
 }
Example #2
0
        public void Extract_ToFolder()
        {
            using (new TestFolderProvider())
            {
                // 创建zip文件
                FileCompresser.CompressFolder(_testFolder, _targetFile);

                FileCompresser.ExtractToFolder(_targetFile, _targetFolder);
                Assert.True(Directory.Exists(_targetFolder));
            }
        }