BAEL-6644-read-zip-entries (#14321)

* read zip file entries

* add unit test

* update test code
This commit is contained in:
vunamtien
2023-07-03 17:04:44 +07:00
committed by GitHub
parent c2445783c0
commit 5506d3c91f
3 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package com.baeldung.zipentries;
import org.junit.Test;
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Path;
import java.nio.file.Paths;
public class ZipEntryReaderTest {
@Test
public void givenZipFile_thenReadEntriesAndValidateContent() throws URISyntaxException, IOException {
Path zipFilePath = Paths.get(getClass().getClassLoader().getResource("zipFile.zip").toURI());
ZipEntryReader.readZipEntries(zipFilePath.toString());
}
}