org.springframework.test.context.support
Class AbstractTestExecutionListener

java.lang.Object
  extended by org.springframework.test.context.support.AbstractTestExecutionListener
All Implemented Interfaces:
TestExecutionListener
Direct Known Subclasses:
DependencyInjectionTestExecutionListener, DirtiesContextTestExecutionListener, TransactionalTestExecutionListener

public abstract class AbstractTestExecutionListener
extends Object
implements TestExecutionListener

Abstract implementation of the TestExecutionListener interface which provides empty method stubs. Subclasses can extend this class and override only those methods suitable for the task at hand.

Since:
2.5
Author:
Sam Brannen, Juergen Hoeller

Constructor Summary
AbstractTestExecutionListener()
           
 
Method Summary
 void afterTestMethod(TestContext testContext)
          The default implementation is empty.
 void beforeTestMethod(TestContext testContext)
          The default implementation is empty.
 void prepareTestInstance(TestContext testContext)
          The default implementation is empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTestExecutionListener

public AbstractTestExecutionListener()
Method Detail

prepareTestInstance

public void prepareTestInstance(TestContext testContext)
                         throws Exception
The default implementation is empty. Can be overridden by subclasses as necessary.

Specified by:
prepareTestInstance in interface TestExecutionListener
Parameters:
testContext - the test context for the test (never null)
Throws:
Exception - allows any exception to propagate

beforeTestMethod

public void beforeTestMethod(TestContext testContext)
                      throws Exception
The default implementation is empty. Can be overridden by subclasses as necessary.

Specified by:
beforeTestMethod in interface TestExecutionListener
Parameters:
testContext - the test context in which the test method will be executed (never null)
Throws:
Exception - allows any exception to propagate

afterTestMethod

public void afterTestMethod(TestContext testContext)
                     throws Exception
The default implementation is empty. Can be overridden by subclasses as necessary.

Specified by:
afterTestMethod in interface TestExecutionListener
Parameters:
testContext - the test context in which the test method was executed (never null)
Throws:
Exception - allows any exception to propagate


Copyright © 2002-2008 The Spring Framework.