Class DirtiesContextBeforeModestestExecutionListener

All Implemented Interfaces:
Ordered, testExecutionListener

public class DirtiesContextBeforeModestestExecutionListener extends AbstractDirtiesContexttestExecutionListener
testExecutionListener which provides support for marking the ApplicationContext associated with a test as dirty for both test classes and test methods annotated with the @DirtiesContext annotation.

This listener supports test methods with the method mode set to BEFORE_METHOD and test classes with the class mode set to BEFORE_EACH_test_METHOD or BEFORE_CLASS. For support for AFTER modes, see DirtiesContexttestExecutionListener.

When merging testExecutionListeners with the defaults, this listener will automatically be ordered before the DependencyInjectiontestExecutionListener; otherwise, this listener must be manually configured to execute before the DependencyInjectiontestExecutionListener.

Since:
4.2
Author:
Sam Brannen
See Also: