static
Request
|
aClass(Class<?> clazz)
Create a Request that, when processed, will run all the tests
in a class.
|
static
Request
|
classWithoutSuiteMethod(Class<?> clazz)
Create a Request that, when processed, will run all the tests
in a class.
|
static
Request
|
classes(Class...<?> classes)
Create a Request that, when processed, will run all the tests
in a set of classes with the default Computer .
|
static
Request
|
classes(Computer computer, Class...<?> classes)
Create a Request that, when processed, will run all the tests
in a set of classes.
|
static
Request
|
errorReport(Class<?> klass, Throwable cause)
Not used within JUnit.
|
Request
|
filterWith(Description desiredDescription)
Returns a Request that only runs contains tests whose Description
equals desiredDescription
|
Request
|
filterWith(Filter filter)
Returns a Request that only contains those tests that should run when
filter is applied
|
abstract
Runner
|
getRunner()
Returns a Runner for this Request
|
static
Request
|
method(Class<?> clazz, String methodName)
Create a Request that, when processed, will run a single test.
|
static
Request
|
runner(Runner runner)
|
Request
|
sortWith(Comparator<Description> comparator)
Returns a Request whose Tests can be run in a certain order, defined by
comparator
For example, here is code to run a test suite in alphabetical order:
private static Comparator forward() {
return new Comparator() {
public int compare(Description o1, Description o2) {
return o1.getDisplayName().compareTo(o2.getDisplayName());
}
};
}
public static main() {
new JUnitCore().run(Request.aClass(AllTests.class).sortWith(forward()));
}
|