public void NormalExecutionTest(int fileSize) { FileHelper.GenerateFile(fileSize, SourceFileName); ZipZipProcessing.Process(SourceFileName, CompressedFileName, true); Assert.True(File.Exists(CompressedFileName)); ZipZipProcessing.Process(CompressedFileName, DecompressedFileName, false); Assert.True(File.Exists(DecompressedFileName)); Assert.True(File.ReadAllBytes(DecompressedFileName).SequenceEqual(File.ReadAllBytes(SourceFileName))); }
public static void Main(string[] args) { ExceptionManager.EnsureManagerInitialized(); args = args.Where(str => !string.IsNullOrEmpty(str)).ToArray(); if (args.Length != 3) { UserErrorException.ThrowUserErrorException("There should be 3 arguments"); } bool compress = ParseMode(args[0]); string inputPath = args[1]; string outputPath = args[2]; ZipZipProcessing.Process(inputPath, outputPath, compress); }