|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.junit.runner.Runner
org.junit.internal.runners.JUnit4ClassRunner
org.unitils.UnitilsJUnit4TestClassRunner
public class UnitilsJUnit4TestClassRunner
Custom test runner that will Unitils-enable your test. This will make sure that the
core unitils test listener methods are invoked in the expected order. See TestListener
for
more information on the listener invocation order.
Nested Class Summary | |
---|---|
protected class |
UnitilsJUnit4TestClassRunner.TestListenerInvokingMethodRoadie
Custom method roadie that invokes the unitils test listener methods at the apropriate moments. |
Constructor Summary | |
---|---|
UnitilsJUnit4TestClassRunner(Class<?> testClass)
Creates a test runner that runs all test methods in the given class. |
Method Summary | |
---|---|
protected org.junit.internal.runners.MethodRoadie |
createMethodRoadie(Object testObject,
Method testMethod,
org.junit.internal.runners.TestMethod jUnitTestMethod,
org.junit.runner.notification.RunNotifier notifier,
org.junit.runner.Description description)
Returns the JUnit 4 MethodRoadie object that is used to execute the test method |
protected TestListener |
getTestListener()
|
protected Unitils |
getUnitils()
Returns the default singleton instance of Unitils |
protected void |
invokeTestMethod(Method method,
org.junit.runner.notification.RunNotifier notifier)
Overridden JUnit4 method to be able to create a CustomMethodRoadie that will invoke the unitils test listener methods at the appropriate moments. |
void |
run(org.junit.runner.notification.RunNotifier notifier)
|
Methods inherited from class org.junit.internal.runners.JUnit4ClassRunner |
---|
classAnnotations, createTest, filter, getDescription, getName, getTestClass, getTestMethods, methodDescription, runMethods, sort, testAnnotations, testName, validate, wrapMethod |
Methods inherited from class org.junit.runner.Runner |
---|
testCount |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnitilsJUnit4TestClassRunner(Class<?> testClass) throws org.junit.internal.runners.InitializationError
testClass
- the class, not null
org.junit.internal.runners.InitializationError
Method Detail |
---|
public void run(org.junit.runner.notification.RunNotifier notifier)
run
in class org.junit.internal.runners.JUnit4ClassRunner
protected void invokeTestMethod(Method method, org.junit.runner.notification.RunNotifier notifier)
invokeTestMethod
in class org.junit.internal.runners.JUnit4ClassRunner
protected org.junit.internal.runners.MethodRoadie createMethodRoadie(Object testObject, Method testMethod, org.junit.internal.runners.TestMethod jUnitTestMethod, org.junit.runner.notification.RunNotifier notifier, org.junit.runner.Description description)
testObject
- The test instance, not nulltestMethod
- The test method, not nulljUnitTestMethod
- The JUnit test methodnotifier
- The run listener, not nulldescription
- A test description
protected TestListener getTestListener()
protected Unitils getUnitils()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |