Class DelegatingPowerMockRunner
- java.lang.Object
-
- org.junit.runner.Runner
-
- org.powermock.modules.junit4.internal.impl.DelegatingPowerMockRunner
-
- All Implemented Interfaces:
org.junit.runner.Describable
,org.junit.runner.manipulation.Filterable
,PowerMockJUnitRunnerDelegate
public class DelegatingPowerMockRunner extends org.junit.runner.Runner implements PowerMockJUnitRunnerDelegate, org.junit.runner.manipulation.Filterable
-
-
Field Summary
Fields Modifier and Type Field Description private org.junit.runner.Runner
delegate
private PowerMockTestNotifier
powerMockTestNotifier
private java.lang.ClassLoader
testClassLoader
private java.lang.String
testClassName
private java.lang.reflect.Method[]
testMethods
-
Constructor Summary
Constructors Constructor Description DelegatingPowerMockRunner(java.lang.Class<?> klass)
DelegatingPowerMockRunner(java.lang.Class<?> klass, java.lang.String[] methodsToRun)
DelegatingPowerMockRunner(java.lang.Class<?> klass, java.lang.String[] methodsToRun, PowerMockTestListener[] listeners)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static org.junit.runner.Runner
createDelegate(java.lang.Class<?> testClass)
private static java.lang.reflect.Method[]
determineTestMethods(java.lang.Class<?> testClass, java.lang.String[] testMethodNames)
void
filter(org.junit.runner.manipulation.Filter filter)
org.junit.runner.Description
getDescription()
java.lang.Class<?>
getTestClass()
int
getTestCount()
void
run(org.junit.runner.notification.RunNotifier notifier)
private static <T> T
withContextClassLoader(java.lang.ClassLoader loader, java.util.concurrent.Callable<T> callable)
-
-
-
Field Detail
-
testClassName
private final java.lang.String testClassName
-
delegate
private final org.junit.runner.Runner delegate
-
testClassLoader
private final java.lang.ClassLoader testClassLoader
-
testMethods
private final java.lang.reflect.Method[] testMethods
-
powerMockTestNotifier
private final PowerMockTestNotifier powerMockTestNotifier
-
-
Constructor Detail
-
DelegatingPowerMockRunner
public DelegatingPowerMockRunner(java.lang.Class<?> klass) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
DelegatingPowerMockRunner
public DelegatingPowerMockRunner(java.lang.Class<?> klass, java.lang.String[] methodsToRun) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
DelegatingPowerMockRunner
public DelegatingPowerMockRunner(java.lang.Class<?> klass, java.lang.String[] methodsToRun, PowerMockTestListener[] listeners) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
determineTestMethods
private static java.lang.reflect.Method[] determineTestMethods(java.lang.Class<?> testClass, java.lang.String[] testMethodNames)
-
createDelegate
private static org.junit.runner.Runner createDelegate(java.lang.Class<?> testClass) throws java.lang.Exception
- Throws:
java.lang.Exception
-
withContextClassLoader
private static <T> T withContextClassLoader(java.lang.ClassLoader loader, java.util.concurrent.Callable<T> callable) throws java.lang.Exception
- Throws:
java.lang.Exception
-
run
public void run(org.junit.runner.notification.RunNotifier notifier)
- Specified by:
run
in interfacePowerMockJUnitRunnerDelegate
- Specified by:
run
in classorg.junit.runner.Runner
-
getDescription
public org.junit.runner.Description getDescription()
- Specified by:
getDescription
in interfaceorg.junit.runner.Describable
- Specified by:
getDescription
in interfacePowerMockJUnitRunnerDelegate
- Specified by:
getDescription
in classorg.junit.runner.Runner
-
getTestCount
public int getTestCount()
- Specified by:
getTestCount
in interfacePowerMockJUnitRunnerDelegate
-
getTestClass
public java.lang.Class<?> getTestClass()
- Specified by:
getTestClass
in interfacePowerMockJUnitRunnerDelegate
-
filter
public void filter(org.junit.runner.manipulation.Filter filter) throws org.junit.runner.manipulation.NoTestsRemainException
- Specified by:
filter
in interfaceorg.junit.runner.manipulation.Filterable
- Throws:
org.junit.runner.manipulation.NoTestsRemainException
-
-