Example #1
0
        public async Task CompressFileDirectory()
        {
            // Arrange

            // Act
            SharpCompressService.CompressFilesInDirectory(InputDirectory, OutputZipFile);

            //Assert
            new FileInfo(OutputZipFile).Exists
            .Should()
            .BeTrue();
        }
Example #2
0
        public async Task CompressFile()
        {
            // Arrange

            // Act
            SharpCompressService.CompressFile(LargeFile, OutputZipFile);

            //Assert
            var fileInfo = new FileInfo(OutputZipFile);

            fileInfo.Exists
            .Should()
            .BeTrue();

            fileInfo.Length
            .Should()
            .BeGreaterThan(1)
            .And
            .BeLessThan(new FileInfo(LargeFile).Length);
        }