Skip to content

Commit

Permalink
Cross reference @NestedTestConfiguration and supported annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Oct 13, 2020
1 parent 74c2df4 commit 4a608e9
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -44,6 +44,11 @@
* {@code @Commit} and {@code @Rollback} on the same test method or on the
* same test class is unsupported and may lead to unpredictable results.
*
* <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
* @since 4.2
* @see Rollback
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -43,6 +43,11 @@
* <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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -49,6 +49,11 @@
* custom <em>composed annotations</em>. Consult the source code for
* {@link Commit @Commit} for a concrete example.
*
* <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
* @since 2.5
* @see Commit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -34,6 +34,10 @@
* <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 NestedTestConfiguration @NestedTestConfiguration} for details.
*
* @author Sam Brannen
* @since 3.1
* @see SmartContextLoader
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -33,6 +33,10 @@
* present</em> on the current test class) will override any meta-present
* declarations of {@code @BootstrapWith}.
*
* <p>As of Spring Framework 5.3, this annotation will be inherited from an
* enclosing test class by default. See
* {@link NestedTestConfiguration @NestedTestConfiguration} for details.
*
* @author Sam Brannen
* @since 4.1
* @see BootstrapContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -75,6 +75,10 @@
* <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 NestedTestConfiguration @NestedTestConfiguration} for details.
*
* @author Sam Brannen
* @since 2.5
* @see org.springframework.test.context.junit.jupiter.SpringJUnitConfig @SpringJUnitConfig
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -134,6 +134,10 @@
* <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 NestedTestConfiguration @NestedTestConfiguration} for details.
*
* @author Sam Brannen
* @since 3.2.2
* @see ContextConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,28 @@
* classes in JUnit Jupiter; however, there may be other testing frameworks with
* support for nested test classes that could also make use of this annotation.
*
* <h3>Supported Annotations</h3>
* <p>The <em>Spring TestContext Framework</em> honors {@code @NestedTestConfiguration}
* semantics for the following annotations.
* <ul>
* <li>{@link BootstrapWith @BootstrapWith}</li>
* <li>{@link TestExecutionListeners @TestExecutionListeners}</li>
* <li>{@link ContextConfiguration @ContextConfiguration}</li>
* <li>{@link ContextHierarchy @ContextHierarchy}</li>
* <li>{@link org.springframework.test.context.web.WebAppConfiguration @WebAppConfiguration}</li>
* <li>{@link ActiveProfiles @ActiveProfiles}</li>
* <li>{@link TestPropertySource @TestPropertySource}</li>
* <li>{@link org.springframework.test.annotation.DirtiesContext @DirtiesContext}</li>
* <li>{@link org.springframework.transaction.annotation.Transactional @Transactional}</li>
* <li>{@link org.springframework.test.annotation.Rollback @Rollback}</li>
* <li>{@link org.springframework.test.annotation.Commit @Commit}</li>
* <li>{@link TestConstructor @TestConstructor}</li>
* </ul>
*
* @author Sam Brannen
* @since 5.3
* @see EnclosingConfiguration#INHERIT
* @see EnclosingConfiguration#OVERRIDE
* @see ContextConfiguration @ContextConfiguration
* @see ContextHierarchy @ContextHierarchy
* @see ActiveProfiles @ActiveProfiles
* @see TestPropertySource @TestPropertySource
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
* {@link org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig @SpringJUnitWebConfig}
* or various test-related annotations from Spring Boot Test.
*
* <p>As of Spring Framework 5.3, this annotation will be inherited from an
* enclosing test class by default. See
* {@link NestedTestConfiguration @NestedTestConfiguration} for details.
*
* @author Sam Brannen
* @since 5.2
* @see org.springframework.beans.factory.annotation.Autowired @Autowired
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -36,6 +36,10 @@
* <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 NestedTestConfiguration @NestedTestConfiguration} for details.
*
* @author Sam Brannen
* @since 2.5
* @see TestExecutionListener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
* annotation since the {@code locations} and {@code inheritLocations} attributes
* of both annotations can lead to ambiguity during the attribute resolution
* process.</li>
* <li>As of Spring Framework 5.3, this annotation will be inherited from an
* enclosing test class by default. See
* {@link NestedTestConfiguration @NestedTestConfiguration} for details.</li>
* </ul>
*
* @author Sam Brannen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -31,6 +31,10 @@
* completely optional since {@code @TestPropertySource} is a
* {@linkplain java.lang.annotation.Repeatable repeatable} annotation.
*
* <p>As of Spring Framework 5.3, this annotation will be inherited from an
* enclosing test class by default. See
* {@link NestedTestConfiguration @NestedTestConfiguration} for details.
*
* @author Anatoliy Korovin
* @author Sam Brannen
* @since 5.2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
Expand Down Expand Up @@ -41,6 +41,11 @@
* <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
* @since 3.2
* @see org.springframework.web.context.WebApplicationContext
Expand Down

0 comments on commit 4a608e9

Please sign in to comment.