Package utils.common

Class ZipUtilTest


  • public class ZipUtilTest
    extends java.lang.Object
    Unit tests for ZipUtil.
    • Field Detail

      • temp

        public org.junit.rules.TemporaryFolder temp
    • Constructor Detail

      • ZipUtilTest

        public ZipUtilTest()
    • 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