java.lang.Object
org.eclipse.jetty.toolchain.test.jupiter.WorkDir

public class WorkDir extends Object
  • Field Details

    • path

      private final Path path
  • Constructor Details

    • WorkDir

      public WorkDir(Path path)
  • Method Details

    • getPath

      public Path getPath()
      Get the test specific directory to use for work directory.

      Name is derived from the test classname & method name.

      Returns:
      the test specific directory.
    • getPathFile

      public Path getPathFile(String name)
      Get a Path file reference for content inside of the test specific work directory.

      Note: No assertions are made if the file exists or not.

      Parameters:
      name - the path name of the file (supports deep paths)
      Returns:
      the file reference.
    • ensureEmpty

      public void ensureEmpty()
      Ensure that the work directory is empty.

      Useful for repeated testing without using the maven clean goal (such as within Eclipse).

    • getEmptyPathDir

      public Path getEmptyPathDir()
      Get the unique work directory while ensuring that it is empty (if not).
      Returns:
      the unique work directory, created, and empty.