public class PowerMockTestNotifierImpl extends Object implements PowerMockTestNotifier
MockRepository
to set and get state.Constructor and Description |
---|
PowerMockTestNotifierImpl(PowerMockTestListener[] powerMockTestListeners)
Create a new instance with the following parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
notifyAfterTestMethod(boolean successful)
Notifies all listeners with the "after test method ended" event.
|
void |
notifyAfterTestMethod(Object testInstance,
Method method,
Object[] arguments,
TestMethodResult testResult)
Notifies all listeners with the "after test method ended" event.
|
void |
notifyAfterTestSuiteEnded(Class<?> testClass,
Method[] methods,
TestSuiteResult testResult)
Notifies all listeners with the "after test suite ended" event.
|
void |
notifyBeforeTestMethod(Object testInstance,
Method testMethod,
Object[] arguments)
Notifies all listeners with the "before test method started" event.
|
void |
notifyBeforeTestSuiteStarted(Class<?> testClass,
Method[] testMethods)
Notifies all listeners with the "before test suite started" event.
|
public PowerMockTestNotifierImpl(PowerMockTestListener[] powerMockTestListeners)
powerMockTestListeners
- The PowerMock listeners that will be notified.public void notifyAfterTestMethod(Object testInstance, Method method, Object[] arguments, TestMethodResult testResult)
PowerMockTestNotifier
notifyAfterTestMethod
in interface PowerMockTestNotifier
testInstance
- instance of testmethod
- test method to be executedarguments
- arguments of test methodstestResult
- result of running of testpublic void notifyAfterTestSuiteEnded(Class<?> testClass, Method[] methods, TestSuiteResult testResult)
PowerMockTestNotifier
notifyAfterTestSuiteEnded
in interface PowerMockTestNotifier
testClass
- class of test suitemethods
- test case methodstestResult
- result of running of testpublic void notifyBeforeTestMethod(Object testInstance, Method testMethod, Object[] arguments)
PowerMockTestNotifier
notifyBeforeTestMethod
in interface PowerMockTestNotifier
testInstance
- instance of testtestMethod
- test method to be executedarguments
- arguments of test methodspublic void notifyBeforeTestSuiteStarted(Class<?> testClass, Method[] testMethods)
PowerMockTestNotifier
notifyBeforeTestSuiteStarted
in interface PowerMockTestNotifier
testClass
- class of test suitetestMethods
- test case methodspublic void notifyAfterTestMethod(boolean successful)
PowerMockTestNotifier
PowerMockTestNotifier.notifyBeforeTestMethod(Object, Method, Object[])
must have been
called before this method. Otherwise revert to using the
PowerMockTestNotifier.notifyAfterTestMethod(Object, Method, Object[], TestMethodResult)
method.notifyAfterTestMethod
in interface PowerMockTestNotifier
successful
- true
if the test was successful,
false
otherwise.Copyright © 2019. All rights reserved.