com.mycila.testing.core.api
Interface TestNotifier


public interface TestNotifier

A TestNotifier is used to fire events in test frameworks. It is created with MycilaTesting.createNotifier(Object) and is used in test frameworks to fire test events to Mycila plugins.

For each event thrown, an Execution context is created and accesible from Mycila.currentExecution()

Author:
Mathieu Carbou (mathieu.carbou@gmail.com)

Method Summary
 void fireAfterClass()
          Fires an event telling plugins that all tests of this class have ended
 void fireAfterTest()
          Must be fired after the execution of a test method, even if the test method was skipped because if a return of false of the beforeTest method.
 void fireBeforeTest(Method method)
          Fires a before test exection event to all plugins
 void prepare()
          Ask for a test preparation
 void shutdown()
          Ask the plugins to shutdown and cleanly close resources
 

Method Detail

prepare

void prepare()
             throws TestPluginException
Ask for a test preparation

Throws:
TestPluginException - If a plugin failed enhancing the test instance

fireBeforeTest

void fireBeforeTest(Method method)
                    throws TestPluginException
Fires a before test exection event to all plugins

Parameters:
method - Test method that will be executed
Throws:
TestPluginException - If a plugin failed in its execution

fireAfterTest

void fireAfterTest()
                   throws TestPluginException
Must be fired after the execution of a test method, even if the test method was skipped because if a return of false of the beforeTest method.

Throws:
TestPluginException - If a plugin failed in its execution

fireAfterClass

void fireAfterClass()
                    throws TestPluginException
Fires an event telling plugins that all tests of this class have ended

Throws:
TestPluginException - If a plugin failed in its execution

shutdown

void shutdown()
Ask the plugins to shutdown and cleanly close resources



Copyright © 2008-2011 Mycila. All Rights Reserved.