Introduce MockEnvironment in the spring-test module

For legacy reasons, a MockEnvironment implementation already exists in multiple places within Spring's test suite; however, it is not available to the general public.

This commit promotes MockEnvironment to a first-class citizen in the spring-test module, alongside the existing MockPropertySource.

In addition, the following house cleaning has been performed.

 - deleted MockPropertySource from the spring-expression module
 - deleted MockEnvironment from the "spring" integration testing module
 - updated test copies of MockPropertySource and MockEnvironment
 - documented MockEnvironment and MockPropertySource in the testing
   chapter of the reference manual

Issue: SPR-9492
This commit is contained in:
Sam Brannen
2012-07-28 20:10:21 +02:00
parent 0329df218e
commit f49b22c78f
9 changed files with 72 additions and 143 deletions

View File

@@ -7,29 +7,29 @@ Changes in version 3.2 M2 (2012-08-xx)
--------------------------------------
* spring-test module now depends on junit:junit-dep (SPR-6966)
* infer return type of parameterized factory methods (SPR-9493)
* used BufferedInputStream in SimpleMetaDataReader to double performance (SPR-9528)
* added "repeatCount" bean property to Quartz SimpleTriggerFactoryBean (SPR-9521)
* added "jtaTransactionManager" property to Hibernate 4 LocalSessionFactoryBean/Builder (SPR-9480)
* raise RestClientException instead of IllegalArgumentException for unknown status codes
* added "defaultCharset" property to StringHttpMessageConverter (SPR-9487)
* added JacksonObjectMapperFactoryBean for configuring a Jackson ObjectMapper in XML
* added ContentNegotiationManager/ContentNegotiationStrategy to resolve requested media types
* added support for the HTTP PATCH method to Spring MVC and to RestTemplate (SPR-7985)
* enable smart suffix pattern match in @RequestMapping methods (SPR-7632)
* DispatcherPortlet does not forward event exceptions to the render phase by default (SPR-9287)
* add defaultCharset property to StringHttpMessageConverter
* add @ExceptionResolver annotation to detect classes with @ExceptionHandler methods
* move RSS/Atom message converter registration ahead of jackson/jaxb2
* handle BindException in DefaultHandlerExceptionResolver
* parameterize DeferredResult type
* use reflection to instantiate StandardServletAsyncWebRequest
* fix issue with forward before async request processing
* add exclude patterns for mapped interceptors in MVC namespace and MVC Java config
* support content negotiation options in MVC namespace and MVC Java config
* support named dispatchers in MockServletContext (SPR-9587)
* support single, unqualified tx manager in the TestContext framework (SPR-9645)
* support TransactionManagementConfigurer in the TestContext framework (SPR-9604)
* now inferring return type of parameterized factory methods (SPR-9493)
* now using BufferedInputStream in SimpleMetaDataReader to double performance (SPR-9528)
* introduced "repeatCount" property in Quartz SimpleTriggerFactoryBean (SPR-9521)
* introduced "jtaTransactionManager" property in Hibernate 4 LocalSessionFactoryBean/Builder (SPR-9480)
* now raising RestClientException instead of IllegalArgumentException for unknown status codes
* introduced JacksonObjectMapperFactoryBean for configuring a Jackson ObjectMapper in XML
* introduced ContentNegotiationManager/ContentNegotiationStrategy for resolving requested media types
* introduced support for the HTTP PATCH method in Spring MVC and RestTemplate (SPR-7985)
* enabled smart suffix pattern matching in @RequestMapping methods (SPR-7632)
* DispatcherPortlet no longer forwards event exceptions to the render phase by default (SPR-9287)
* introduced "defaultCharset" property in StringHttpMessageConverter (SPR-9487)
* introduced @ExceptionResolver annotation for detecting classes with @ExceptionHandler methods
* moved RSS/Atom message converter registration ahead of jackson/jaxb2
* now handling BindException in DefaultHandlerExceptionResolver
* DeferredResult type is now parameterized
* now using reflection to instantiate StandardServletAsyncWebRequest
* fixed issue with forward before async request processing
* introduced exclude patterns for mapped interceptors in MVC namespace and MVC Java config
* introduced support for content negotiation options in MVC namespace and MVC Java config
* introduced support for named dispatchers in MockServletContext (SPR-9587)
* introduced support for single, unqualified tx manager in the TestContext framework (SPR-9645)
* introduced support for TransactionManagementConfigurer in the TestContext framework (SPR-9604)
* introduced MockEnvironment in the spring-test module (SPR-9492)
Changes in version 3.2 M1 (2012-05-28)