Polish wording regarding previous release versions in reference manual

This commit is contained in:
Sam Brannen 2016-04-06 14:45:28 +02:00
parent 0c0c904837
commit b6f99e38ae
1 changed files with 12 additions and 11 deletions

View File

@ -75,7 +75,7 @@ The `org.springframework.mock.web` package contains a comprehensive set of Servl
mock objects, which are useful for testing web contexts, controllers, and filters. These mock objects, which are useful for testing web contexts, controllers, and filters. These
mock objects are targeted at usage with Spring's Web MVC framework and are generally more mock objects are targeted at usage with Spring's Web MVC framework and are generally more
convenient to use than dynamic mock objects such as http://www.easymock.org[EasyMock] or convenient to use than dynamic mock objects such as http://www.easymock.org[EasyMock] or
alternative Servlet API mock objects such as http://www.mockobjects.com[MockObjects]. As of alternative Servlet API mock objects such as http://www.mockobjects.com[MockObjects]. Since
Spring Framework 4.0, the set of mocks in the `org.springframework.mock.web` package is Spring Framework 4.0, the set of mocks in the `org.springframework.mock.web` package is
based on the Servlet 3.0 API. based on the Servlet 3.0 API.
@ -1127,7 +1127,7 @@ well as any __set up__ or __tear down__ of the test fixture.
[[integration-testing-annotations-meta]] [[integration-testing-annotations-meta]]
==== Meta-Annotation Support for Testing ==== Meta-Annotation Support for Testing
As of Spring Framework 4.0, it is possible to use test-related annotations as Since Spring Framework 4.0, it is possible to use test-related annotations as
<<beans-meta-annotations,meta-annotations>> in order to create custom _composed annotations_ <<beans-meta-annotations,meta-annotations>> in order to create custom _composed annotations_
and reduce configuration duplication across a test suite. and reduce configuration duplication across a test suite.
@ -1347,8 +1347,8 @@ via the `@TestExecutionListeners` annotation. See
Registering custom ++TestExecutionListener++s via `@TestExecutionListeners` is suitable Registering custom ++TestExecutionListener++s via `@TestExecutionListeners` is suitable
for custom listeners that are used in limited testing scenarios; however, it can become for custom listeners that are used in limited testing scenarios; however, it can become
cumbersome if a custom listener needs to be used across a test suite. To address this cumbersome if a custom listener needs to be used across a test suite. Since Spring
issue, Spring Framework 4.1 supports automatic discovery of _default_ Framework 4.1, this issue is addressed via support for automatic discovery of _default_
`TestExecutionListener` implementations via the `SpringFactoriesLoader` mechanism. `TestExecutionListener` implementations via the `SpringFactoriesLoader` mechanism.
Specifically, the `spring-test` module declares all core default Specifically, the `spring-test` module declares all core default
@ -1401,7 +1401,8 @@ any custom listeners. The following listing demonstrates this style of configura
The challenge with this approach is that it requires that the developer know exactly The challenge with this approach is that it requires that the developer know exactly
which listeners are registered by default. Moreover, the set of default listeners can which listeners are registered by default. Moreover, the set of default listeners can
change from release to release -- for example, `SqlScriptsTestExecutionListener` was change from release to release -- for example, `SqlScriptsTestExecutionListener` was
introduced in Spring Framework 4.1. Furthermore, third-party frameworks like Spring introduced in Spring Framework 4.1, and `DirtiesContextBeforeModesTestExecutionListener`
was introduced in Spring Framework 4.2. Furthermore, third-party frameworks like Spring
Security register their own default ++TestExecutionListener++s via the aforementioned Security register their own default ++TestExecutionListener++s via the aforementioned
<<testcontext-tel-config-automatic-discovery, automatic discovery mechanism>>. <<testcontext-tel-config-automatic-discovery, automatic discovery mechanism>>.
@ -2548,6 +2549,7 @@ the context cache key:
* `locations` __(from @ContextConfiguration)__ * `locations` __(from @ContextConfiguration)__
* `classes` __(from @ContextConfiguration)__ * `classes` __(from @ContextConfiguration)__
* `contextInitializerClasses` __(from @ContextConfiguration)__ * `contextInitializerClasses` __(from @ContextConfiguration)__
* `contextCustomizers` __(from ContextCustomizerFactory)__
* `contextLoader` __(from @ContextConfiguration)__ * `contextLoader` __(from @ContextConfiguration)__
* `parent` __(from @ContextHierarchy)__ * `parent` __(from @ContextHierarchy)__
* `activeProfiles` __(from @ActiveProfiles)__ * `activeProfiles` __(from @ActiveProfiles)__
@ -2617,7 +2619,7 @@ components. Another use case can be found in Spring Batch applications where you
have a parent context that provides configuration for shared batch infrastructure and a have a parent context that provides configuration for shared batch infrastructure and a
child context for the configuration of a specific batch job. child context for the configuration of a specific batch job.
As of Spring Framework 3.2.2, it is possible to write integration tests that use context Since Spring Framework 3.2.2, it is possible to write integration tests that use context
hierarchies by declaring context configuration via the `@ContextHierarchy` annotation, hierarchies by declaring context configuration via the `@ContextHierarchy` annotation,
either on an individual test class or within a test class hierarchy. If a context either on an individual test class or within a test class hierarchy. If a context
hierarchy is declared on multiple classes within a test class hierarchy it is also hierarchy is declared on multiple classes within a test class hierarchy it is also
@ -2921,9 +2923,8 @@ bean by name there (as shown above, assuming that "myDataSource" is the bean id)
==== Testing request and session scoped beans ==== Testing request and session scoped beans
<<beans-factory-scopes-other,Request and session scoped beans>> have been supported by <<beans-factory-scopes-other,Request and session scoped beans>> have been supported by
Spring for several years now, but it's always been a bit non-trivial to test them. As of Spring since the early years, and since Spring 3.2 it's a breeze to test your
Spring 3.2 it's a breeze to test your request-scoped and session-scoped beans by request-scoped and session-scoped beans by following these steps.
following these steps.
* Ensure that a `WebApplicationContext` is loaded for your test by annotating your test * Ensure that a `WebApplicationContext` is loaded for your test by annotating your test
class with `@WebAppConfiguration`. class with `@WebAppConfiguration`.
@ -3155,7 +3156,7 @@ via the `@Commit` and `@Rollback` annotations. See the corresponding entries in
[[testcontext-tx-programmatic-tx-mgt]] [[testcontext-tx-programmatic-tx-mgt]]
===== Programmatic transaction management ===== Programmatic transaction management
As of Spring Framework 4.1, it is possible to interact with test-managed transactions Since Spring Framework 4.1, it is possible to interact with test-managed transactions
_programmatically_ via the static methods in `TestTransaction`. For example, _programmatically_ via the static methods in `TestTransaction`. For example,
`TestTransaction` may be used within _test_ methods, _before_ methods, and _after_ `TestTransaction` may be used within _test_ methods, _before_ methods, and _after_
methods to start or end the current test-managed transaction or to configure the current methods to start or end the current test-managed transaction or to configure the current
@ -4119,7 +4120,7 @@ This can be done as follows, where `print()` is a static import from
---- ----
As long as request processing does not cause an unhandled exception, the `print()` method As long as request processing does not cause an unhandled exception, the `print()` method
will print all the available result data to `System.out`. Spring Framework 4.2 introduces will print all the available result data to `System.out`. Spring Framework 4.2 introduced
a `log()` method and two additional variants of the `print()` method, one that accepts a `log()` method and two additional variants of the `print()` method, one that accepts
an `OutputStream` and one that accepts a `Writer`. For example, invoking an `OutputStream` and one that accepts a `Writer`. For example, invoking
`print(System.err)` will print the result data to `System.err`; while invoking `print(System.err)` will print the result data to `System.err`; while invoking