org.unitils.easymock
Class EasyMockModule.EasyMockTestListener
java.lang.Object
org.unitils.core.TestListener
org.unitils.easymock.EasyMockModule.EasyMockTestListener
- Enclosing class:
- EasyMockModule
protected class EasyMockModule.EasyMockTestListener
- extends TestListener
Test listener that handles the mock creation and injection.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EasyMockModule.EasyMockTestListener
protected EasyMockModule.EasyMockTestListener()
beforeTestSetUp
public void beforeTestSetUp(Object testObject,
Method testMethod)
- Before the test is executed this calls
EasyMockModule.createAndInjectRegularMocksIntoTest(Object)
to
create and inject all mocks on the class.
- Overrides:
beforeTestSetUp
in class TestListener
- Parameters:
testObject
- The test instance, not nulltestMethod
- The test method, not null
afterTestMethod
public void afterTestMethod(Object testObject,
Method testMethod,
Throwable throwable)
- After each test is executed this calls
EasyMockModule.verify()
to verify the recorded behavior
of all created mocks.
- Overrides:
afterTestMethod
in class TestListener
- Parameters:
testObject
- The test instance, not nulltestMethod
- The test method, not nullthrowable
- The throwable thrown during the test or beforeTestMethod, null if none was thrown
Copyright © 2011. All Rights Reserved.