org.unitils.inject
Class InjectModule.InjectTestListener
java.lang.Object
org.unitils.core.TestListener
org.unitils.inject.InjectModule.InjectTestListener
- Enclosing class:
- InjectModule
protected class InjectModule.InjectTestListener
- extends TestListener
The TestListener
for this module
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InjectModule.InjectTestListener
protected InjectModule.InjectTestListener()
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 nulltestMethod
- 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 nulltestMethod
- The test method, not nullthrowable
- The throwable thrown during the test, null if none was thrown
Copyright © 2011. All Rights Reserved.