-
Couldn't load subscription status.
- Fork 38.8k
Closed
Labels
in: testIssues in the test moduleIssues in the test moduletheme: aotAn issue related to Ahead-of-time processingAn issue related to Ahead-of-time processingtype: bugA general bugA general bug
Milestone
Description
As can be seen in the tests introduced in commit 4a0edc5, the static factory methods in MockReset (such as MockReset.before() and MockReset.after()) can currently only be applied to beans within the ApplicationContext if the test class declares at least one field annotated with either @MockitoBean or @MockitoSpyBean.
However, as stated in the Javadoc, it should be possible to apply MockReset:
directly to any mock in the
ApplicationContextusing the static methods in this class.
We therefore need to rework the "enabled" logic in MockitoResetTestExecutionListener to support that documented use case.
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test moduletheme: aotAn issue related to Ahead-of-time processingAn issue related to Ahead-of-time processingtype: bugA general bugA general bug