public final class PathTestHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static Path |
getAppClassLocation(Class<?> testClass)
Resolves the directory or the JAR file containing the application being tested by the test class.
|
static Path |
getAppClassLocationForTestLocation(String testClassLocation)
Resolves the directory or the JAR file containing the application being tested by a test from the given location.
|
static Path |
getResourcesForClassesDirOrNull(Path classesDir,
String name)
Returns the resources directory that compliments the classes directory.
|
static Path |
getTestClassesLocation(Class<?> testClass)
Resolves the directory or the JAR file containing the test class.
|
static boolean |
isTestClass(String className,
ClassLoader classLoader,
Path testLocation) |
public static Path getTestClassesLocation(Class<?> testClass)
testClass - the test classpublic static Path getAppClassLocation(Class<?> testClass)
testClass - the test classpublic static Path getAppClassLocationForTestLocation(String testClassLocation)
testClassLocation - the test class locationpublic static Path getResourcesForClassesDirOrNull(Path classesDir, String name)
classesDir - classes directoryname - 'test' for test resources or 'main' for the main resourcespublic static boolean isTestClass(String className, ClassLoader classLoader, Path testLocation)
Copyright © 2021 JBoss by Red Hat. All rights reserved.