public class PowerMockJUnit44RunnerDelegateImpl
extends org.junit.runner.Runner
implements org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable, org.powermock.modules.junit4.common.internal.PowerMockJUnitRunnerDelegate
JUnit4ClassRunner used in JUnit 4.4. It does however not extend this
class because we cannot let it perform the stuff it does in its constructor.
Another thing that different is that if an exception is thrown in the test we
add a tip to error message asking the user if they've not forgot to add a
class to test. Yet another difference is that this runner notifies the
PowerMock listeners of certain events.JUnit4ClassRunner| Modifier and Type | Class and Description |
|---|---|
protected class |
PowerMockJUnit44RunnerDelegateImpl.PowerMockJUnit44MethodRunner |
| Constructor and Description |
|---|
PowerMockJUnit44RunnerDelegateImpl(java.lang.Class<?> klass) |
PowerMockJUnit44RunnerDelegateImpl(java.lang.Class<?> klass,
java.lang.String[] methodsToRun) |
PowerMockJUnit44RunnerDelegateImpl(java.lang.Class<?> klass,
java.lang.String[] methodsToRun,
org.powermock.core.spi.PowerMockTestListener[] listeners) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.annotation.Annotation[] |
classAnnotations() |
protected PowerMockJUnit44RunnerDelegateImpl.PowerMockJUnit44MethodRunner |
createPowerMockRunner(java.lang.Object testInstance,
org.junit.internal.runners.TestMethod testMethod,
org.junit.runner.notification.RunNotifier notifier,
org.junit.runner.Description description,
boolean extendsFromTestCase) |
protected java.lang.Object |
createTest() |
void |
filter(org.junit.runner.manipulation.Filter filter) |
org.junit.runner.Description |
getDescription() |
protected java.lang.String |
getName() |
java.lang.Class<?> |
getTestClass() |
int |
getTestCount() |
protected java.util.List<java.lang.reflect.Method> |
getTestMethods(java.lang.Class<?> klass,
java.lang.String[] methodsToRun) |
protected org.junit.internal.runners.TestClass |
getTestWrappedClass() |
protected void |
invokeTestMethod(java.lang.reflect.Method method,
org.junit.runner.notification.RunNotifier notifier) |
protected org.junit.runner.Description |
methodDescription(java.lang.reflect.Method method) |
void |
run(org.junit.runner.notification.RunNotifier notifier) |
protected void |
runMethods(org.junit.runner.notification.RunNotifier notifier) |
void |
sort(org.junit.runner.manipulation.Sorter sorter) |
protected java.lang.annotation.Annotation[] |
testAnnotations(java.lang.reflect.Method method) |
protected java.lang.String |
testName(java.lang.reflect.Method method) |
protected void |
validate() |
protected org.junit.internal.runners.TestMethod |
wrapMethod(java.lang.reflect.Method method) |
public PowerMockJUnit44RunnerDelegateImpl(java.lang.Class<?> klass,
java.lang.String[] methodsToRun,
org.powermock.core.spi.PowerMockTestListener[] listeners)
throws org.junit.internal.runners.InitializationError
org.junit.internal.runners.InitializationErrorpublic PowerMockJUnit44RunnerDelegateImpl(java.lang.Class<?> klass,
java.lang.String[] methodsToRun)
throws org.junit.internal.runners.InitializationError
org.junit.internal.runners.InitializationErrorpublic PowerMockJUnit44RunnerDelegateImpl(java.lang.Class<?> klass)
throws org.junit.internal.runners.InitializationError
org.junit.internal.runners.InitializationErrorprotected final java.util.List<java.lang.reflect.Method> getTestMethods(java.lang.Class<?> klass,
java.lang.String[] methodsToRun)
protected final void validate()
throws org.junit.internal.runners.InitializationError
org.junit.internal.runners.InitializationErrorpublic void run(org.junit.runner.notification.RunNotifier notifier)
run in interface org.powermock.modules.junit4.common.internal.PowerMockJUnitRunnerDelegaterun in class org.junit.runner.Runnerprotected void runMethods(org.junit.runner.notification.RunNotifier notifier)
public org.junit.runner.Description getDescription()
getDescription in interface org.junit.runner.DescribablegetDescription in interface org.powermock.modules.junit4.common.internal.PowerMockJUnitRunnerDelegategetDescription in class org.junit.runner.Runnerprotected java.lang.annotation.Annotation[] classAnnotations()
protected java.lang.String getName()
protected java.lang.Object createTest()
throws java.lang.Exception
java.lang.Exceptionprotected void invokeTestMethod(java.lang.reflect.Method method,
org.junit.runner.notification.RunNotifier notifier)
protected PowerMockJUnit44RunnerDelegateImpl.PowerMockJUnit44MethodRunner createPowerMockRunner(java.lang.Object testInstance, org.junit.internal.runners.TestMethod testMethod, org.junit.runner.notification.RunNotifier notifier, org.junit.runner.Description description, boolean extendsFromTestCase)
protected org.junit.internal.runners.TestMethod wrapMethod(java.lang.reflect.Method method)
protected java.lang.String testName(java.lang.reflect.Method method)
protected org.junit.runner.Description methodDescription(java.lang.reflect.Method method)
protected java.lang.annotation.Annotation[] testAnnotations(java.lang.reflect.Method method)
public void filter(org.junit.runner.manipulation.Filter filter)
throws org.junit.runner.manipulation.NoTestsRemainException
filter in interface org.junit.runner.manipulation.Filterableorg.junit.runner.manipulation.NoTestsRemainExceptionpublic void sort(org.junit.runner.manipulation.Sorter sorter)
sort in interface org.junit.runner.manipulation.Sortableprotected org.junit.internal.runners.TestClass getTestWrappedClass()
public int getTestCount()
getTestCount in interface org.powermock.modules.junit4.common.internal.PowerMockJUnitRunnerDelegatepublic java.lang.Class<?> getTestClass()
getTestClass in interface org.powermock.modules.junit4.common.internal.PowerMockJUnitRunnerDelegate