Class TestHelper

java.lang.Object
com.pervasive.datarush.commons.test.TestHelper

public final class TestHelper extends Object
A provider of useful services for unit tests.
  • Constructor Details

    • TestHelper

      public TestHelper(Class<?> testClass)
      Creates a helper for the specified test class. Paths produced will be based on the fully qualified path of the class.
      Parameters:
      testClass - the class object of the test with which the helper is associated
  • Method Details

    • getBaseScratchPath

      public static String getBaseScratchPath()
      Return the base scratch path.
      Returns:
      base scratch path
    • getScratchPath

      public String getScratchPath(String fileName)
      Gets the file path to a specified scratch file. A fileName of null will return the path to the scratch directory for this test.
      Parameters:
      fileName - the scratch file for which to get the path
      Returns:
      the file path to the specified scratch file
    • getResourcePath

      public String getResourcePath(String resourceName)
      Gets the file path to a specified resource. A resourceName of null will return the path to the directory containing the resources for this test.
      Parameters:
      resourceName - the resource for which to retrieve the path
      Returns:
      the file path to the specified resource