Class PowerMockRunNotifier
java.lang.Object
org.junit.runner.notification.RunNotifier
org.powermock.modules.junit4.internal.impl.PowerMockRunNotifier
- All Implemented Interfaces:
GlobalNotificationBuildSupport.Callback
class PowerMockRunNotifier
extends org.junit.runner.notification.RunNotifier
implements GlobalNotificationBuildSupport.Callback
Wraps JUnit's RunNotifier to make sure that the PowerMock-specific
instances of
PowerMockTestListener will also be informed.
It is stateful and (hopefully) thread-safe.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.junit.runner.notification.RunNotifierprivate final Threadprivate final ThreadLocal<NotificationBuilder> private final LinkedList<Object> private final PowerMockTestNotifierprivate Class<?> private final Method[] -
Constructor Summary
ConstructorsConstructorDescriptionPowerMockRunNotifier(org.junit.runner.notification.RunNotifier junitRunNotifier, PowerMockTestNotifier powerMockTestNotifier, Method[] testMethods) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFirstListener(org.junit.runner.notification.RunListener listener) voidaddListener(org.junit.runner.notification.RunListener listener) voidfireTestAssumptionFailed(org.junit.runner.notification.Failure failure) voidfireTestFailure(org.junit.runner.notification.Failure failure) voidfireTestFinished(org.junit.runner.Description description) voidfireTestIgnored(org.junit.runner.Description description) voidfireTestRunFinished(org.junit.runner.Result result) voidfireTestRunStarted(org.junit.runner.Description description) voidfireTestStarted(org.junit.runner.Description description) (package private) Class<?> private voidvoidvoidremoveListener(org.junit.runner.notification.RunListener listener) voidsuiteClassInitiated(Class<?> testClass) voidtestInstanceCreated(Object testInstance) Methods inherited from class org.junit.runner.notification.RunNotifier
fireTestSuiteFinished, fireTestSuiteStarted
-
Field Details
-
suiteClass
-
motherThread
-
junitRunNotifier
private final org.junit.runner.notification.RunNotifier junitRunNotifier -
powerMockTestNotifier
-
testMethods
-
pendingTestInstancesOnMotherThread
-
notificationBuilder
-
-
Constructor Details
-
PowerMockRunNotifier
PowerMockRunNotifier(org.junit.runner.notification.RunNotifier junitRunNotifier, PowerMockTestNotifier powerMockTestNotifier, Method[] testMethods)
-
-
Method Details
-
getSuiteClass
Class<?> getSuiteClass() -
suiteClassInitiated
- Specified by:
suiteClassInitiatedin interfaceGlobalNotificationBuildSupport.Callback
-
testInstanceCreated
- Specified by:
testInstanceCreatedin interfaceGlobalNotificationBuildSupport.Callback
-
addListener
public void addListener(org.junit.runner.notification.RunListener listener) - Overrides:
addListenerin classorg.junit.runner.notification.RunNotifier
-
removeListener
public void removeListener(org.junit.runner.notification.RunListener listener) - Overrides:
removeListenerin classorg.junit.runner.notification.RunNotifier
-
fireTestRunStarted
public void fireTestRunStarted(org.junit.runner.Description description) - Overrides:
fireTestRunStartedin classorg.junit.runner.notification.RunNotifier
-
fireTestRunFinished
public void fireTestRunFinished(org.junit.runner.Result result) - Overrides:
fireTestRunFinishedin classorg.junit.runner.notification.RunNotifier
-
fireTestStarted
public void fireTestStarted(org.junit.runner.Description description) throws org.junit.runner.notification.StoppedByUserException - Overrides:
fireTestStartedin classorg.junit.runner.notification.RunNotifier- Throws:
org.junit.runner.notification.StoppedByUserException
-
fireTestFailure
public void fireTestFailure(org.junit.runner.notification.Failure failure) - Overrides:
fireTestFailurein classorg.junit.runner.notification.RunNotifier
-
fireTestAssumptionFailed
public void fireTestAssumptionFailed(org.junit.runner.notification.Failure failure) - Overrides:
fireTestAssumptionFailedin classorg.junit.runner.notification.RunNotifier
-
fireTestIgnored
public void fireTestIgnored(org.junit.runner.Description description) - Overrides:
fireTestIgnoredin classorg.junit.runner.notification.RunNotifier
-
fireTestFinished
public void fireTestFinished(org.junit.runner.Description description) - Overrides:
fireTestFinishedin classorg.junit.runner.notification.RunNotifier
-
pleaseStop
public void pleaseStop()- Overrides:
pleaseStopin classorg.junit.runner.notification.RunNotifier
-
addFirstListener
public void addFirstListener(org.junit.runner.notification.RunListener listener) - Overrides:
addFirstListenerin classorg.junit.runner.notification.RunNotifier
-
invoke
-