public abstract class Filter
extends java.lang.Object
Filter and apply an instance of
your filter to the Request before running it (see
JUnitCore.run(Request). Alternatively, apply a Filter to
a Runner before running tests (for example, in conjunction with
RunWith.| Modifier and Type | Field and Description |
|---|---|
static Filter |
ALL
A null
Filter that passes all tests through. |
| Constructor and Description |
|---|
Filter() |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Runner runner)
Invoke with a
Runner to cause all tests it intends to run
to first be checked with the filter. |
abstract java.lang.String |
describe()
Returns a textual description of this Filter
|
abstract boolean |
shouldRun(Description description) |
public static Filter ALL
Filter that passes all tests through.public abstract boolean shouldRun(Description description)
description - the description of the test to be runtrue if the test should be runpublic void apply(Runner runner) throws NoTestsRemainException
Runner to cause all tests it intends to run
to first be checked with the filter. Only those that pass the filter will be run.runner - the runner to be filtered by the receiverNoTestsRemainException - if the receiver removes all testspublic abstract java.lang.String describe()