Package org.junit.internal.runners
Class JUnit38ClassRunner
- java.lang.Object
-
- org.junit.runner.Runner
-
- org.junit.internal.runners.JUnit38ClassRunner
-
- All Implemented Interfaces:
Describable
,Filterable
,Sortable
- Direct Known Subclasses:
SuiteMethod
public class JUnit38ClassRunner extends Runner implements Filterable, Sortable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JUnit38ClassRunner.OldTestClassAdaptingListener
-
Constructor Summary
Constructors Constructor Description JUnit38ClassRunner(java.lang.Class<?> klass)
JUnit38ClassRunner(Test test)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TestListener
createAdaptingListener(RunNotifier notifier)
private static java.lang.String
createSuiteDescription(TestSuite ts)
void
filter(Filter filter)
Remove tests that don't pass the parameterfilter
.private static java.lang.annotation.Annotation[]
getAnnotations(TestCase test)
Get the annotations associated with given TestCase.Description
getDescription()
private Test
getTest()
private static Description
makeDescription(Test test)
void
run(RunNotifier notifier)
Run the tests for this runner.private void
setTest(Test test)
void
sort(Sorter sorter)
Sorts the tests usingsorter
-
-
-
Field Detail
-
test
private volatile Test test
-
-
Constructor Detail
-
JUnit38ClassRunner
public JUnit38ClassRunner(java.lang.Class<?> klass)
-
JUnit38ClassRunner
public JUnit38ClassRunner(Test test)
-
-
Method Detail
-
run
public void run(RunNotifier notifier)
Description copied from class:Runner
Run the tests for this runner.
-
createAdaptingListener
public TestListener createAdaptingListener(RunNotifier notifier)
-
getDescription
public Description getDescription()
- Specified by:
getDescription
in interfaceDescribable
- Specified by:
getDescription
in classRunner
- Returns:
- a
Description
showing the tests to be run by the receiver
-
makeDescription
private static Description makeDescription(Test test)
-
getAnnotations
private static java.lang.annotation.Annotation[] getAnnotations(TestCase test)
Get the annotations associated with given TestCase.- Parameters:
test
- the TestCase.
-
createSuiteDescription
private static java.lang.String createSuiteDescription(TestSuite ts)
-
filter
public void filter(Filter filter) throws NoTestsRemainException
Description copied from interface:Filterable
Remove tests that don't pass the parameterfilter
.- Specified by:
filter
in interfaceFilterable
- Parameters:
filter
- theFilter
to apply- Throws:
NoTestsRemainException
- if all tests are filtered out
-
sort
public void sort(Sorter sorter)
Description copied from interface:Sortable
Sorts the tests usingsorter
-
setTest
private void setTest(Test test)
-
getTest
private Test getTest()
-
-