org.unitils.inject
Class InjectModule.InjectTestListener

java.lang.Object
  extended by org.unitils.core.TestListener
      extended by org.unitils.inject.InjectModule.InjectTestListener
Enclosing class:
InjectModule

protected class InjectModule.InjectTestListener
extends TestListener

The TestListener for this module


Constructor Summary
protected InjectModule.InjectTestListener()
           
 
Method Summary
 void afterTestMethod(Object testObject, Method testMethod, Throwable throwable)
          After test execution, if requested restore all values that were replaced in the static injection.
 void beforeTestMethod(Object testObject, Method testMethod)
          Before executing a test method (i.e. after the fixture methods), the injection is performed, since objects to inject or targets are possibly instantiated during the fixture.
 
Methods inherited from class org.unitils.core.TestListener
afterCreateTestObject, afterTestTearDown, beforeTestClass, beforeTestSetUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectModule.InjectTestListener

protected InjectModule.InjectTestListener()
Method Detail

beforeTestMethod

public void beforeTestMethod(Object testObject,
                             Method testMethod)
Before executing a test method (i.e. after the fixture methods), the injection is performed, since objects to inject or targets are possibly instantiated during the fixture.

Overrides:
beforeTestMethod in class TestListener
Parameters:
testObject - The test object, not null
testMethod - The test method, not null

afterTestMethod

public void afterTestMethod(Object testObject,
                            Method testMethod,
                            Throwable throwable)
After test execution, if requested restore all values that were replaced in the static injection.

Overrides:
afterTestMethod in class TestListener
Parameters:
testObject - The test object, not null
testMethod - The test method, not null
throwable - The throwable thrown during the test, null if none was thrown


Copyright © 2011. All Rights Reserved.