You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 MockEnvironment to the spring-test module.
Delete all other occurrences of MockEnvironment, where possible.
Clean up the Gradle build if necessary.
deemed unnecessary
Document the existence of MockEnvironment and MockPropertySource in the testing chapter of the reference manual.
Affects: 3.1 GA
The text was updated successfully, but these errors were encountered:
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
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 thespring-test
module, alongside the existingMockPropertySource
.Doing so would eliminate at least the copy of
MockEnvironment
in the basespring
module. It would also solve the Javadoc warning thatMockEnvironment
is not visible fromMockPropertySource
in thespring-test
module.Deliverables
MockEnvironment
to thespring-test
module.MockEnvironment
, where possible.MockEnvironment
andMockPropertySource
in the testing chapter of the reference manual.Affects: 3.1 GA
The text was updated successfully, but these errors were encountered: