public abstract class BaseTest extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
baseClassPath
Base path for class-relative test resource references.
|
private String |
basePackagePath
Base path for package-relative test resource references.
|
protected Class<?> |
testingClass
Class being tested.
|
private Package |
testingPackage
Package for the class being tested.
|
| Modifier | Constructor and Description |
|---|---|
protected |
BaseTest(Class<?> clazz)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
classRelativeResource(String which)
Makes a resource reference relative to the class being tested.
|
Resource |
getClasspathResource(String resourcePath)
Helper method to acquire a ClassPathResource based on the given resource path.
|
private String |
nameToPath(String name)
Converts the "."-separated name of a class or package into an
absolute path.
|
protected String |
packageRelativeResource(String which)
Makes a resource reference relative to the package of the class being tested.
|
protected String |
simpleClassRelativeName(String which) |
protected final Class<?> testingClass
private final String baseClassPath
private final Package testingPackage
private final String basePackagePath
protected BaseTest(Class<?> clazz)
private String nameToPath(String name)
name - name to be convertedprotected String classRelativeResource(String which)
which - class-relative resource nameprotected String packageRelativeResource(String which)
which - package-relative resource namepublic Resource getClasspathResource(String resourcePath)
resourcePath - classpath path to the resourceCopyright © 1999–2015. All rights reserved.