Class ZipUtilsTest

java.lang.Object
test.de.iip_ecosphere.platform.support.ZipUtilsTest

public class ZipUtilsTest extends Object
Tests ZipUtils.
Author:
Holger Eichelberger, SSE
  • Constructor Details

    • ZipUtilsTest

      public ZipUtilsTest()
  • Method Details

    • extractFullZip

      public void extractFullZip() throws IOException
      Tests ZipUtils.extractZip(java.io.InputStream, java.nio.file.Path).
      Throws:
      IOException - if reading/writing fails
    • assertFileExists

      private static void assertFileExists(File base, String name, boolean isDirectory)
      Asserts that a file/directory exists.
      Parameters:
      base - the base directory
      name - the name/path in base to be asserted
      isDirectory - true if the specified shall be a directory, false for a file
    • assertFileNotExists

      private static void assertFileNotExists(File base, String name)
      Asserts that a file/directory does not exists.
      Parameters:
      base - the base directory
      name - the name/path in base to be asserted
    • extractPartialZip

      public void extractPartialZip() throws IOException
      Tests ZipUtils.extractZip(java.io.InputStream, java.nio.file.Path, java.util.function.Predicate).
      Throws:
      IOException - if reading/writing fails
    • testListFiles

      public void testListFiles() throws IOException
      Tests ZipUtils.listFiles(InputStream, java.util.function.Predicate, java.util.function.Consumer).
      Throws:
      IOException - if reading/writing fails