org.springframework.test.context.support
Class DirtiesContextTestExecutionListener
java.lang.Object
   org.springframework.test.context.support.AbstractTestExecutionListener
org.springframework.test.context.support.AbstractTestExecutionListener
       org.springframework.test.context.support.DirtiesContextTestExecutionListener
org.springframework.test.context.support.DirtiesContextTestExecutionListener
- All Implemented Interfaces: 
- TestExecutionListener
- public class DirtiesContextTestExecutionListener 
- extends AbstractTestExecutionListener
TestExecutionListener which processes test methods configured
 with the @DirtiesContext annotation.
- Since:
- 2.5
- Author:
- Sam Brannen, Juergen Hoeller
- See Also:
- DirtiesContext
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
DirtiesContextTestExecutionListener
public DirtiesContextTestExecutionListener()
afterTestMethod
public void afterTestMethod(TestContext testContext)
                     throws Exception
- If the current test method of the supplied
 test contexthas been annotated with@DirtiesContext, theapplication contextof the test context will
 bemarked as dirty,
 and theDependencyInjectionTestExecutionListener.REINJECT_DEPENDENCIES_ATTRIBUTEwill be set totruein the test context.
 
- 
- Specified by:
- afterTestMethodin interface- TestExecutionListener
- Overrides:
- afterTestMethodin class- AbstractTestExecutionListener
 
- 
- 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.