org.powermock.tests.utils
Interface PowerMockTestNotifier

All Known Implementing Classes:
PowerMockTestNotifierImpl

public interface PowerMockTestNotifier

Implementors 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
 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.
 

Method Detail

notifyBeforeTestMethod

void notifyBeforeTestMethod(Object testInstance,
                            Method testMethod,
                            Object[] arguments)
Notifies all listeners with the "before test method started" event.


notifyAfterTestMethod

void notifyAfterTestMethod(Object testInstance,
                           Method method,
                           Object[] arguments,
                           TestMethodResult testResult)
Notifies all listeners with the "after test method ended" event.


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 work notifyBeforeTestMethod(Object, Method, Object[]) must have been called before this method. Otherwise revert to using the notifyAfterTestMethod(Object, Method, Object[], TestMethodResult) method.

Parameters:
successful - true if the test was successful, false otherwise.

notifyBeforeTestSuiteStarted

void notifyBeforeTestSuiteStarted(Class<?> testClass,
                                  Method[] testMethods)
Notifies all listeners with the "before test suite started" event.


notifyAfterTestSuiteEnded

void notifyAfterTestSuiteEnded(Class<?> testClass,
                               Method[] methods,
                               TestSuiteResult testResult)
Notifies all listeners with the "after test suite ended" event.



Copyright © 2007-2014. All Rights Reserved.