-
Couldn't load subscription status.
- Fork 38.8k
Description
Sam Brannen opened SPR-9492 and commented
Status Quo
For legacy reasons, a MockEnvironment implementation already exists in multiple places within Spring's test suite. Furthermore, it is not available to the general public.
Goal
MockEnvironment can be used as a general purpose stub within developer tests (i.e., not just within Spring's own test suite). As such, it should be promoted to a first-class citizen in the spring-test module, alongside the existing MockPropertySource.
Doing so would eliminate at least the copy of MockEnvironment in the base spring module. It would also solve the Javadoc warning that MockEnvironment is not visible from MockPropertySource in the spring-test module.
Deliverables
- Move
MockEnvironmentto thespring-testmodule. - Delete all other occurrences of
MockEnvironment, where possible. - Clean up the Gradle build if necessary.
- deemed unnecessary
- Document the existence of
MockEnvironmentandMockPropertySourcein the testing chapter of the reference manual.
Affects: 3.1 GA