Class TestUtilities

java.lang.Object
org.glassfish.main.itest.tools.TestUtilities

public final class TestUtilities extends Object
Tools useful just for tests, so they don't belong to any application code.
  • Method Details

    • delete

      public static void delete(File... files) throws IOException
      Deletes files if they exist. If it existed but was not possible to delete the file, uses NIO to delete it again - NIO throws an exception in such case.

      Attempts to delete all files and throws the IOException if any of them was not possible to delete. Therefore this method should be the last call in your cleanup method (ie. AfterEach or AfterAll)

      Parameters:
      files - files to delete
      Throws:
      IOException - some files were not deleted.