org.junit.internal.runners
Class JUnit4ClassRunner
java.lang.Object
org.junit.runner.Runner
org.junit.internal.runners.JUnit4ClassRunner
- All Implemented Interfaces:
- Filterable, Sortable
- Direct Known Subclasses:
- TestClassRunner, Theories
public class JUnit4ClassRunner
- extends Runner
- implements Filterable, Sortable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JUnit4ClassRunner
public JUnit4ClassRunner(java.lang.Class<?> klass)
throws InitializationError
- Throws:
InitializationError
getTestMethods
protected java.util.List<java.lang.reflect.Method> getTestMethods()
validate
protected void validate()
throws InitializationError
- Throws:
InitializationError
run
public void run(RunNotifier notifier)
- Description copied from class:
Runner
- Run the tests for this runner.
- Specified by:
run
in class Runner
- Parameters:
notifier
- will be notified of events while tests are being run--tests being
started, finishing, and failing
runMethods
protected void runMethods(RunNotifier notifier)
getDescription
public Description getDescription()
- Specified by:
getDescription
in class Runner
- Returns:
- a
Description
showing the tests to be run by the receiver
classAnnotations
protected java.lang.annotation.Annotation[] classAnnotations()
getName
protected java.lang.String getName()
createTest
protected java.lang.Object createTest()
throws java.lang.Exception
- Throws:
java.lang.Exception
invokeTestMethod
protected void invokeTestMethod(java.lang.reflect.Method method,
RunNotifier notifier)
wrapMethod
protected TestMethod wrapMethod(java.lang.reflect.Method method)
testName
protected java.lang.String testName(java.lang.reflect.Method method)
methodDescription
protected Description methodDescription(java.lang.reflect.Method method)
testAnnotations
protected java.lang.annotation.Annotation[] testAnnotations(java.lang.reflect.Method method)
filter
public void filter(Filter filter)
throws NoTestsRemainException
- Description copied from interface:
Filterable
- Remove tests that don't pass the parameter
filter
.
- Specified by:
filter
in interface Filterable
- Parameters:
filter
- the Filter
to apply
- Throws:
NoTestsRemainException
- if all tests are filtered out
sort
public void sort(Sorter sorter)
- Description copied from interface:
Sortable
- Sorts the tests using
sorter
- Specified by:
sort
in interface Sortable
- Parameters:
sorter
- the Sorter
to use for sorting the tests
getTestClass
protected TestClass getTestClass()