Package org.powermock.tests.utils
Interface PowerMockTestNotifier
-
- All Known Implementing Classes:
PowerMockTestNotifierImpl
public interface PowerMockTestNotifierImplementors of this interface that must provide the ability to notify PowerMock test listeners with the events as specified by the methods declared in this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidnotifyAfterTestMethod(boolean successful)Notifies all listeners with the "after test method ended" event.voidnotifyAfterTestMethod(java.lang.Object testInstance, java.lang.reflect.Method testMethod, java.lang.Object[] arguments, TestMethodResult testResult)Notifies all listeners with the "after test method ended" event.voidnotifyAfterTestSuiteEnded(java.lang.Class<?> testClass, java.lang.reflect.Method[] methods, TestSuiteResult testResult)Notifies all listeners with the "after test suite ended" event.voidnotifyBeforeTestMethod(java.lang.Object testInstance, java.lang.reflect.Method testMethod, java.lang.Object[] arguments)Notifies all listeners with the "before test method started" event.voidnotifyBeforeTestSuiteStarted(java.lang.Class<?> testClass, java.lang.reflect.Method[] testMethods)Notifies all listeners with the "before test suite started" event.
-
-
-
Method Detail
-
notifyBeforeTestMethod
void notifyBeforeTestMethod(java.lang.Object testInstance, java.lang.reflect.Method testMethod, java.lang.Object[] arguments)Notifies all listeners with the "before test method started" event.- Parameters:
testInstance- instance of testtestMethod- test method to be executedarguments- arguments of test methods
-
notifyAfterTestMethod
void notifyAfterTestMethod(java.lang.Object testInstance, java.lang.reflect.Method testMethod, java.lang.Object[] arguments, TestMethodResult testResult)Notifies all listeners with the "after test method ended" event.- Parameters:
testInstance- instance of testtestMethod- test method to be executedarguments- arguments of test methodstestResult- result of running of test
-
notifyAfterTestMethod
void notifyAfterTestMethod(boolean successful)
Notifies all listeners with the "after test method ended" event. Uses some state-store to get the needed state. For this method to worknotifyBeforeTestMethod(Object, Method, Object[])must have been called before this method. Otherwise revert to using thenotifyAfterTestMethod(Object, Method, Object[], TestMethodResult)method.- Parameters:
successful-trueif the test was successful,falseotherwise.
-
notifyBeforeTestSuiteStarted
void notifyBeforeTestSuiteStarted(java.lang.Class<?> testClass, java.lang.reflect.Method[] testMethods)Notifies all listeners with the "before test suite started" event.- Parameters:
testClass- class of test suitetestMethods- test case methods
-
notifyAfterTestSuiteEnded
void notifyAfterTestSuiteEnded(java.lang.Class<?> testClass, java.lang.reflect.Method[] methods, TestSuiteResult testResult)Notifies all listeners with the "after test suite ended" event.- Parameters:
testClass- class of test suitemethods- test case methodstestResult- result of running of test
-
-