class PowerMockRunNotifier extends org.junit.runner.notification.RunNotifier implements GlobalNotificationBuildSupport.Callback
PowerMockTestListener
will also be informed.
It is stateful and (hopefully) thread-safe.PowerMockTestListener
Modifier and Type | Field and Description |
---|---|
private org.junit.runner.notification.RunNotifier |
junitRunNotifier |
private java.lang.Thread |
motherThread |
private java.lang.ThreadLocal<NotificationBuilder> |
notificationBuilder |
private java.util.LinkedList<java.lang.Object> |
pendingTestInstancesOnMotherThread |
private PowerMockTestNotifier |
powerMockTestNotifier |
private java.lang.Class<?> |
suiteClass |
private java.lang.reflect.Method[] |
testMethods |
Constructor and Description |
---|
PowerMockRunNotifier(org.junit.runner.notification.RunNotifier junitRunNotifier,
PowerMockTestNotifier powerMockTestNotifier,
java.lang.reflect.Method[] testMethods) |
Modifier and Type | Method and Description |
---|---|
void |
addFirstListener(org.junit.runner.notification.RunListener listener) |
void |
addListener(org.junit.runner.notification.RunListener listener) |
void |
fireTestAssumptionFailed(org.junit.runner.notification.Failure failure) |
void |
fireTestFailure(org.junit.runner.notification.Failure failure) |
void |
fireTestFinished(org.junit.runner.Description description) |
void |
fireTestIgnored(org.junit.runner.Description description) |
void |
fireTestRunFinished(org.junit.runner.Result result) |
void |
fireTestRunStarted(org.junit.runner.Description description) |
void |
fireTestStarted(org.junit.runner.Description description) |
(package private) java.lang.Class<?> |
getSuiteClass() |
private void |
invoke(java.lang.String methodName,
java.lang.Object... args) |
void |
pleaseStop() |
void |
removeListener(org.junit.runner.notification.RunListener listener) |
void |
suiteClassInitiated(java.lang.Class<?> testClass) |
void |
testInstanceCreated(java.lang.Object testInstance) |
private java.lang.Class<?> suiteClass
private final java.lang.Thread motherThread
private final org.junit.runner.notification.RunNotifier junitRunNotifier
private final PowerMockTestNotifier powerMockTestNotifier
private final java.lang.reflect.Method[] testMethods
private final java.util.LinkedList<java.lang.Object> pendingTestInstancesOnMotherThread
private final java.lang.ThreadLocal<NotificationBuilder> notificationBuilder
PowerMockRunNotifier(org.junit.runner.notification.RunNotifier junitRunNotifier, PowerMockTestNotifier powerMockTestNotifier, java.lang.reflect.Method[] testMethods)
java.lang.Class<?> getSuiteClass()
public void suiteClassInitiated(java.lang.Class<?> testClass)
suiteClassInitiated
in interface GlobalNotificationBuildSupport.Callback
public void testInstanceCreated(java.lang.Object testInstance)
testInstanceCreated
in interface GlobalNotificationBuildSupport.Callback
public void addListener(org.junit.runner.notification.RunListener listener)
addListener
in class org.junit.runner.notification.RunNotifier
public void removeListener(org.junit.runner.notification.RunListener listener)
removeListener
in class org.junit.runner.notification.RunNotifier
public void fireTestRunStarted(org.junit.runner.Description description)
fireTestRunStarted
in class org.junit.runner.notification.RunNotifier
public void fireTestRunFinished(org.junit.runner.Result result)
fireTestRunFinished
in class org.junit.runner.notification.RunNotifier
public void fireTestStarted(org.junit.runner.Description description) throws org.junit.runner.notification.StoppedByUserException
fireTestStarted
in class org.junit.runner.notification.RunNotifier
org.junit.runner.notification.StoppedByUserException
public void fireTestFailure(org.junit.runner.notification.Failure failure)
fireTestFailure
in class org.junit.runner.notification.RunNotifier
public void fireTestAssumptionFailed(org.junit.runner.notification.Failure failure)
fireTestAssumptionFailed
in class org.junit.runner.notification.RunNotifier
public void fireTestIgnored(org.junit.runner.Description description)
fireTestIgnored
in class org.junit.runner.notification.RunNotifier
public void fireTestFinished(org.junit.runner.Description description)
fireTestFinished
in class org.junit.runner.notification.RunNotifier
public void pleaseStop()
pleaseStop
in class org.junit.runner.notification.RunNotifier
public void addFirstListener(org.junit.runner.notification.RunListener listener)
addFirstListener
in class org.junit.runner.notification.RunNotifier
private void invoke(java.lang.String methodName, java.lang.Object... args)