MockReset
should be honored without @Mockito[Spy]Bean
fields
#33829
Labels
in: test
Issues in the test module
theme: aot
An issue related to Ahead-of-time processing
type: bug
A general bug
Milestone
As can be seen in the tests introduced in commit 4a0edc5, the static factory methods in
MockReset
(such asMockReset.before()
andMockReset.after()
) can currently only be applied to beans within theApplicationContext
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
:We therefore need to rework the "enabled" logic in
MockitoResetTestExecutionListener
to support that documented use case.The text was updated successfully, but these errors were encountered: