Frank Scheffler opened SPR-13916 and commented
We are using Mockito mocks quite often throughout our Spring-based integration tests, which leaves us with the problem of resetting them before/after each test method. While we can use some globally defined custom TestExecutionListener to reset all the mocks found within the ApplicationContext, it would be more practical to be able to define specific event-listeners within the application context itself. This would allow for more fine-grained control over which beans (i.e. mocks) should be reset.
Deliverables
Issue Links:
2 votes, 6 watchers
Frank Scheffler opened SPR-13916 and commented
We are using Mockito mocks quite often throughout our Spring-based integration tests, which leaves us with the problem of resetting them before/after each test method. While we can use some globally defined custom TestExecutionListener to reset all the mocks found within the ApplicationContext, it would be more practical to be able to define specific event-listeners within the application context itself. This would allow for more fine-grained control over which beans (i.e. mocks) should be reset.
Deliverables
EventPublishingTestExecutionListener.TestContextEventand all concrete subclasses.@EventListenerannotations for all events.Issue Links:
2 votes, 6 watchers