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.RunNotifier
private final Thread
private final ThreadLocal
<NotificationBuilder> private final LinkedList
<Object> private final PowerMockTestNotifier
private Class
<?> private final Method[]
-
Constructor Summary
ConstructorsConstructorDescriptionPowerMockRunNotifier
(org.junit.runner.notification.RunNotifier junitRunNotifier, PowerMockTestNotifier powerMockTestNotifier, Method[] testMethods) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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) Class
<?> private void
void
void
removeListener
(org.junit.runner.notification.RunListener listener) void
suiteClassInitiated
(Class<?> testClass) void
testInstanceCreated
(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:
suiteClassInitiated
in interfaceGlobalNotificationBuildSupport.Callback
-
testInstanceCreated
- Specified by:
testInstanceCreated
in interfaceGlobalNotificationBuildSupport.Callback
-
addListener
public void addListener(org.junit.runner.notification.RunListener listener) - Overrides:
addListener
in classorg.junit.runner.notification.RunNotifier
-
removeListener
public void removeListener(org.junit.runner.notification.RunListener listener) - Overrides:
removeListener
in classorg.junit.runner.notification.RunNotifier
-
fireTestRunStarted
public void fireTestRunStarted(org.junit.runner.Description description) - Overrides:
fireTestRunStarted
in classorg.junit.runner.notification.RunNotifier
-
fireTestRunFinished
public void fireTestRunFinished(org.junit.runner.Result result) - Overrides:
fireTestRunFinished
in classorg.junit.runner.notification.RunNotifier
-
fireTestStarted
public void fireTestStarted(org.junit.runner.Description description) throws org.junit.runner.notification.StoppedByUserException - Overrides:
fireTestStarted
in classorg.junit.runner.notification.RunNotifier
- Throws:
org.junit.runner.notification.StoppedByUserException
-
fireTestFailure
public void fireTestFailure(org.junit.runner.notification.Failure failure) - Overrides:
fireTestFailure
in classorg.junit.runner.notification.RunNotifier
-
fireTestAssumptionFailed
public void fireTestAssumptionFailed(org.junit.runner.notification.Failure failure) - Overrides:
fireTestAssumptionFailed
in classorg.junit.runner.notification.RunNotifier
-
fireTestIgnored
public void fireTestIgnored(org.junit.runner.Description description) - Overrides:
fireTestIgnored
in classorg.junit.runner.notification.RunNotifier
-
fireTestFinished
public void fireTestFinished(org.junit.runner.Description description) - Overrides:
fireTestFinished
in classorg.junit.runner.notification.RunNotifier
-
pleaseStop
public void pleaseStop()- Overrides:
pleaseStop
in classorg.junit.runner.notification.RunNotifier
-
addFirstListener
public void addFirstListener(org.junit.runner.notification.RunListener listener) - Overrides:
addFirstListener
in classorg.junit.runner.notification.RunNotifier
-
invoke
-