java.lang.Object
com.pervasive.datarush.commons.test.TestHelper
A provider of useful services for unit tests.
-
Constructor Summary
ConstructorsConstructorDescriptionTestHelper(Class<?> testClass) Creates a helper for the specified test class. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturn the base scratch path.getResourcePath(String resourceName) Gets the file path to a specified resource.getScratchPath(String fileName) Gets the file path to a specified scratch file.
-
Constructor Details
-
TestHelper
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
Return the base scratch path.- Returns:
- base scratch path
-
getScratchPath
Gets the file path to a specified scratch file. AfileNameof 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
Gets the file path to a specified resource. AresourceNameof 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
-