Polish @DirtiesContext Javadoc
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,8 +31,8 @@ import java.lang.annotation.Target;
|
||||
*
|
||||
* <p>Use this annotation if a test has modified the context — for
|
||||
* example, by modifying the state of a singleton bean, modifying the state
|
||||
* of an embedded database, etc. Subsequent tests that request the same
|
||||
* context will be supplied a new context.
|
||||
* of an embedded database, etc. Subsequent tests that request the same context
|
||||
* will be supplied a new context.
|
||||
*
|
||||
* <p>{@code @DirtiesContext} may be used as a class-level and method-level
|
||||
* annotation within the same class or class hierarchy. In such scenarios, the
|
||||
@@ -40,14 +40,6 @@ import java.lang.annotation.Target;
|
||||
* after any such annotated method as well as before or after the current test
|
||||
* class, depending on the configured {@link #methodMode} and {@link #classMode}.
|
||||
*
|
||||
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
|
||||
* <em>composed annotations</em>.
|
||||
*
|
||||
* <p>As of Spring Framework 5.3, this annotation will be inherited from an
|
||||
* enclosing test class by default. See
|
||||
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
|
||||
* for details.
|
||||
*
|
||||
* <h3>Supported Test Phases</h3>
|
||||
* <ul>
|
||||
* <li><strong>Before current test class</strong>: when declared at the class
|
||||
@@ -70,9 +62,18 @@ import java.lang.annotation.Target;
|
||||
* </ul>
|
||||
*
|
||||
* <p>{@code BEFORE_*} modes are supported by the
|
||||
* {@link org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener DirtiesContextBeforeModesTestExecutionListener};
|
||||
* {@code AFTER_*} modes are supported by the
|
||||
* {@link org.springframework.test.context.support.DirtiesContextTestExecutionListener DirtiesContextTestExecutionListener}.
|
||||
* {@link org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener
|
||||
* DirtiesContextBeforeModesTestExecutionListener}; {@code AFTER_*} modes are supported by the
|
||||
* {@link org.springframework.test.context.support.DirtiesContextTestExecutionListener
|
||||
* DirtiesContextTestExecutionListener}.
|
||||
*
|
||||
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
|
||||
* <em>composed annotations</em>.
|
||||
*
|
||||
* <p>As of Spring Framework 5.3, this annotation will be inherited from an
|
||||
* enclosing test class by default. See
|
||||
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
|
||||
* for details.
|
||||
*
|
||||
* @author Sam Brannen
|
||||
* @author Rod Johnson
|
||||
|
||||
Reference in New Issue
Block a user