Skip to content

Commit 74c2df4

Browse files
committed
Improve Javadoc for @NestedTestConfiguration
See gh-19930
1 parent 2934a82 commit 74c2df4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

spring-test/src/main/java/org/springframework/test/context/NestedTestConfiguration.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@
3939
* mode</em> will be used. See {@link #ENCLOSING_CONFIGURATION_PROPERTY_NAME} for
4040
* details on how to change the default mode.
4141
*
42-
* <p>By default, if {@code @NestedTestConfiguration} is not <em>present</em> or
43-
* <em>meta-present</em> on a test class, configuration from the test class will
44-
* propagate to inner test classes (see {@link EnclosingConfiguration#INHERIT}).
45-
* If {@code @NestedTestConfiguration(OVERRIDE)} is used to switch the mode,
42+
* <p>When the {@link EnclosingConfiguration#INHERIT INHERIT} mode is in use,
43+
* configuration from an enclosing test class will be inherited by inner test
44+
* classes, analogous to the semantics within a test class inheritance hierarchy.
45+
* When the {@link EnclosingConfiguration#OVERRIDE OVERRIDE} mode is in use,
4646
* inner test classes will have to declare their own Spring test configuration
4747
* annotations. If you wish to explicitly configure the mode, annotate either
48-
* the inner test class or an enclosing class with
49-
* {@code @NestedTestConfiguration(...}. Note that a
48+
* the inner test class or one of its enclosing classes with
49+
* {@code @NestedTestConfiguration(...)}. Note that a
5050
* {@code @NestedTestConfiguration(...)} declaration is inherited within the
5151
* superclass hierarchy as well as within the enclosing class hierarchy. Thus,
5252
* there is no need to redeclare the annotation unless you wish to switch the
@@ -57,7 +57,8 @@
5757
*
5858
* <p>As of Spring Framework 5.3, the use of this annotation typically only makes
5959
* sense in conjunction with {@link org.junit.jupiter.api.Nested @Nested} test
60-
* classes in JUnit Jupiter.
60+
* classes in JUnit Jupiter; however, there may be other testing frameworks with
61+
* support for nested test classes that could also make use of this annotation.
6162
*
6263
* @author Sam Brannen
6364
* @since 5.3

0 commit comments

Comments
 (0)