Package utils.common
Class ZipUtilTest
- java.lang.Object
-
- utils.common.ZipUtilTest
-
public class ZipUtilTest extends java.lang.ObjectUnit tests for ZipUtil.
-
-
Field Summary
Fields Modifier and Type Field Description org.junit.rules.TemporaryFoldertemp
-
Constructor Summary
Constructors Constructor Description ZipUtilTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcloseMocks()static voidmockCommon()voidtestAddDataToZip()voidtestAddDirToZip_preservesStructureAndSeparators()voidtestAddFileToZip_withCustomNameAndRoot()voidtestAddFileToZip_withZipRoot()voidtestUnzip_preventsPathTraversal()voidtestZipFilesAndUnzip_roundtrip()
-
-
-
Method Detail
-
mockCommon
public static void mockCommon()
-
closeMocks
public static void closeMocks()
-
testZipFilesAndUnzip_roundtrip
public void testZipFilesAndUnzip_roundtrip() throws java.lang.Exception- Throws:
java.lang.Exception
-
testAddDirToZip_preservesStructureAndSeparators
public void testAddDirToZip_preservesStructureAndSeparators() throws java.lang.Exception- Throws:
java.lang.Exception
-
testAddFileToZip_withZipRoot
public void testAddFileToZip_withZipRoot() throws java.lang.Exception- Throws:
java.lang.Exception
-
testAddFileToZip_withCustomNameAndRoot
public void testAddFileToZip_withCustomNameAndRoot() throws java.lang.Exception- Throws:
java.lang.Exception
-
testAddDataToZip
public void testAddDataToZip() throws java.lang.Exception- Throws:
java.lang.Exception
-
testUnzip_preventsPathTraversal
public void testUnzip_preventsPathTraversal() throws java.lang.Exception- Throws:
java.lang.Exception
-
-