Stop referring to old Spring versions in the reference manual
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[[testcontext-application-events]]
|
||||
= Application Events
|
||||
|
||||
Since Spring Framework 5.3.3, the TestContext framework provides support for recording
|
||||
The TestContext framework provides support for recording
|
||||
xref:core/beans/context-introduction.adoc#context-functionality-events[application events] published in the
|
||||
`ApplicationContext` so that assertions can be performed against those events within
|
||||
tests. All events published during the execution of a single test are made available via
|
||||
|
||||
@@ -366,8 +366,8 @@ automatically inherit the `@ActiveProfiles` configuration from the base class. I
|
||||
following example, the declaration of `@ActiveProfiles` (as well as other annotations)
|
||||
has been moved to an abstract superclass, `AbstractIntegrationTest`:
|
||||
|
||||
NOTE: As of Spring Framework 5.3, test configuration may also be inherited from enclosing
|
||||
classes. See xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit-jupiter-nested-test-configuration[`@Nested` test class configuration] for details.
|
||||
NOTE: Test configuration may also be inherited from enclosing classes. See
|
||||
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit-jupiter-nested-test-configuration[`@Nested` test class configuration] for details.
|
||||
|
||||
[tabs]
|
||||
======
|
||||
|
||||
@@ -17,8 +17,8 @@ is set to `false`, the resource locations or component classes and the context
|
||||
initializers, respectively, for the test class shadow and effectively replace the
|
||||
configuration defined by superclasses.
|
||||
|
||||
NOTE: As of Spring Framework 5.3, test configuration may also be inherited from enclosing
|
||||
classes. See xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit-jupiter-nested-test-configuration[`@Nested` test class configuration] for details.
|
||||
NOTE: Test configuration may also be inherited from enclosing classes. See
|
||||
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit-jupiter-nested-test-configuration[`@Nested` test class configuration] for details.
|
||||
|
||||
In the next example, which uses XML resource locations, the `ApplicationContext` for
|
||||
`ExtendedTest` is loaded from `base-config.xml` and `extended-config.xml`, in that order.
|
||||
|
||||
@@ -168,7 +168,8 @@ Kotlin::
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
As of Spring Framework 5.2, `@TestPropertySource` can be used as _repeatable annotation_.
|
||||
`@TestPropertySource` can be used as _repeatable annotation_.
|
||||
|
||||
That means that you can have multiple declarations of `@TestPropertySource` on a single
|
||||
test class, with the `locations` and `properties` from later `@TestPropertySource`
|
||||
annotations overriding those from previous `@TestPropertySource` annotations.
|
||||
@@ -261,8 +262,8 @@ If the `inheritLocations` or `inheritProperties` attribute in `@TestPropertySour
|
||||
set to `false`, the locations or inlined properties, respectively, for the test class
|
||||
shadow and effectively replace the configuration defined by superclasses.
|
||||
|
||||
NOTE: As of Spring Framework 5.3, test configuration may also be inherited from enclosing
|
||||
classes. See xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit-jupiter-nested-test-configuration[`@Nested` test class configuration] for details.
|
||||
NOTE: Test configuration may also be inherited from enclosing classes. See
|
||||
xref:testing/testcontext-framework/support-classes.adoc#testcontext-junit-jupiter-nested-test-configuration[`@Nested` test class configuration] for details.
|
||||
|
||||
In the next example, the `ApplicationContext` for `BaseTest` is loaded by using only the
|
||||
`base.properties` file as a test property source. In contrast, the `ApplicationContext`
|
||||
|
||||
@@ -495,7 +495,7 @@ details).
|
||||
[[testcontext-executing-sql-declaratively-script-merging]]
|
||||
=== Merging and Overriding Configuration with `@SqlMergeMode`
|
||||
|
||||
As of Spring Framework 5.2, it is possible to merge method-level `@Sql` declarations with
|
||||
It is possible to merge method-level `@Sql` declarations with
|
||||
class-level declarations. For example, this allows you to provide the configuration for a
|
||||
database schema or some common test data once per test class and then provide additional,
|
||||
use case specific test data per test method. To enable `@Sql` merging, annotate either
|
||||
|
||||
@@ -531,12 +531,8 @@ to the `RepetitionInfo`.
|
||||
[[testcontext-junit-jupiter-nested-test-configuration]]
|
||||
=== `@Nested` test class configuration
|
||||
|
||||
The _Spring TestContext Framework_ has supported the use of test-related annotations on
|
||||
`@Nested` test classes in JUnit Jupiter since Spring Framework 5.0; however, until Spring
|
||||
Framework 5.3 class-level test configuration annotations were not _inherited_ from
|
||||
enclosing classes like they are from superclasses.
|
||||
|
||||
Spring Framework 5.3 introduced first-class support for inheriting test class
|
||||
The _Spring TestContext Framework_ supports the use of test-related annotations on `@Nested`
|
||||
test classes in JUnit Jupiter, including first-class support for inheriting test class
|
||||
configuration from enclosing classes, and such configuration will be inherited by
|
||||
default. To change from the default `INHERIT` mode to `OVERRIDE` mode, you may annotate
|
||||
an individual `@Nested` test class with
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[[testcontext-test-execution-events]]
|
||||
= Test Execution Events
|
||||
|
||||
The `EventPublishingTestExecutionListener` introduced in Spring Framework 5.2 offers an
|
||||
alternative approach to implementing a custom `TestExecutionListener`. Components in the
|
||||
test's `ApplicationContext` can listen to the following events published by the
|
||||
The `EventPublishingTestExecutionListener` offers an alternative approach to implementing
|
||||
a custom `TestExecutionListener`. Components in the test's `ApplicationContext` can
|
||||
listen to the following events published by the
|
||||
`EventPublishingTestExecutionListener`, each of which corresponds to a method in the
|
||||
`TestExecutionListener` API.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user