Esempio n. 1
0
        public async Task ExtractedFilesCountShouldMatch()
        {
            var partialReader = new PartialFileReader("ZipFiles", "nested.zip");
            var lister        = new ZipContentLister(partialReader);
            var content       = await lister.GetContents();

            Assert.AreEqual(content.Count, 1);
        }
        public async Task ShouldHaveExpectedFileName()
        {
            var partialReader = new PartialFileReader("ZipFiles", "foo64.zip");
            var lister        = new ZipContentLister(partialReader);
            var content       = await lister.GetContents();

            Assert.AreEqual(content[0].FullName, "Documents/foo.txt");
        }
Esempio n. 3
0
 public async Task ShouldThroExceptionForZeroByteZipFile()
 {
     var partialReader = new PartialFileReader("ZipFiles", "zero-byte.zip");
     var lister        = new ZipContentLister(partialReader);
     await lister.GetContents();
 }
Esempio n. 4
0
 public async Task ShouldThrowExceptionForNonZipFile()
 {
     var partialReader = new PartialFileReader("ZipFiles", "not-a-zip.zip");
     var lister        = new ZipContentLister(partialReader);
     await lister.GetContents();
 }