Exemplo n.º 1
0
        public void RemoveFile()
        {
            ZipFiles();

            FileProcessor sut = new FileProcessor();

            sut.RemoveFromZip(outputZipFile, @"somefiles\text1.txt");

            // Asserts omitted
        }
Exemplo n.º 2
0
        public void ZipFiles()
        {
            File.Delete(outputZipFile);

            FileProcessor sut = new FileProcessor();

            sut.ZipDirectory(inputDirectory, outputZipFile);

            Assert.True(File.Exists(outputZipFile));
        }
Exemplo n.º 3
0
        public void AddFile()
        {
            ZipFiles();

            FileProcessor sut = new FileProcessor();

            sut.AddToZip(outputZipFile, @"c:\psdata\AnExtraFile.txt");

            // Asserts omitted
        }
Exemplo n.º 4
0
        public void UnzipFiles()
        {
            ZipFiles();

            string unzipDestinationDir = Path.Combine(inputDirectory, @"..\unzip");

            unzipDestinationDir = Path.GetFullPath(unzipDestinationDir);

            if (Directory.Exists(unzipDestinationDir))
            {
                Directory.Delete(unzipDestinationDir, true);
            }

            FileProcessor sut = new FileProcessor();

            sut.UnZip(outputZipFile, unzipDestinationDir);

            // Asserts omitted
        }