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.Runnerdelegateprivate PowerMockTestNotifierpowerMockTestNotifierprivate java.lang.ClassLoadertestClassLoaderprivate java.lang.StringtestClassNameprivate 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.RunnercreateDelegate(java.lang.Class<?> testClass)private static java.lang.reflect.Method[]determineTestMethods(java.lang.Class<?> testClass, java.lang.String[] testMethodNames)voidfilter(org.junit.runner.manipulation.Filter filter)org.junit.runner.DescriptiongetDescription()java.lang.Class<?>getTestClass()intgetTestCount()voidrun(org.junit.runner.notification.RunNotifier notifier)private static <T> TwithContextClassLoader(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:
runin interfacePowerMockJUnitRunnerDelegate- Specified by:
runin classorg.junit.runner.Runner
-
getDescription
public org.junit.runner.Description getDescription()
- Specified by:
getDescriptionin interfaceorg.junit.runner.Describable- Specified by:
getDescriptionin interfacePowerMockJUnitRunnerDelegate- Specified by:
getDescriptionin classorg.junit.runner.Runner
-
getTestCount
public int getTestCount()
- Specified by:
getTestCountin interfacePowerMockJUnitRunnerDelegate
-
getTestClass
public java.lang.Class<?> getTestClass()
- Specified by:
getTestClassin interfacePowerMockJUnitRunnerDelegate
-
filter
public void filter(org.junit.runner.manipulation.Filter filter) throws org.junit.runner.manipulation.NoTestsRemainException- Specified by:
filterin interfaceorg.junit.runner.manipulation.Filterable- Throws:
org.junit.runner.manipulation.NoTestsRemainException
-
-