public class JUnit4TestAdapter extends java.lang.Object implements Test, Filterable, Sortable, Describable
| Modifier and Type | Field and Description |
|---|---|
private JUnit4TestAdapterCache |
fCache |
private java.lang.Class<?> |
fNewTestClass |
private Runner |
fRunner |
| Constructor and Description |
|---|
JUnit4TestAdapter(java.lang.Class<?> newTestClass) |
JUnit4TestAdapter(java.lang.Class<?> newTestClass,
JUnit4TestAdapterCache cache) |
| Modifier and Type | Method and Description |
|---|---|
int |
countTestCases()
Counts the number of test cases that will be run by this test.
|
void |
filter(Filter filter)
Remove tests that don't pass the parameter
filter. |
Description |
getDescription() |
java.lang.Class<?> |
getTestClass() |
java.util.List<Test> |
getTests() |
private boolean |
isIgnored(Description description) |
private Description |
removeIgnored(Description description) |
void |
run(TestResult result)
Runs a test and collects its result in a TestResult instance.
|
void |
sort(Sorter sorter)
Sorts the tests using
sorter |
java.lang.String |
toString() |
private final java.lang.Class<?> fNewTestClass
private final Runner fRunner
private final JUnit4TestAdapterCache fCache
public JUnit4TestAdapter(java.lang.Class<?> newTestClass)
public JUnit4TestAdapter(java.lang.Class<?> newTestClass,
JUnit4TestAdapterCache cache)
public int countTestCases()
TestcountTestCases in interface Testpublic void run(TestResult result)
Testpublic java.util.List<Test> getTests()
public java.lang.Class<?> getTestClass()
public Description getDescription()
getDescription in interface DescribableDescription showing the tests to be run by the receiverprivate Description removeIgnored(Description description)
private boolean isIgnored(Description description)
public java.lang.String toString()
toString in class java.lang.Objectpublic void filter(Filter filter) throws NoTestsRemainException
Filterablefilter.filter in interface Filterablefilter - the Filter to applyNoTestsRemainException - if all tests are filtered out