Skip to content

Offer a way for MockitoTestExecutionListener to enable strict stubbing #33318

Closed
@jschmied

Description

@jschmied

Running tests with SpringRunner does not report unused stubs like MockitoJUnitRunner does.

In MockitoTestExecutionListener.initMocks it should use

Mockito.mockitoSession()
  .initMocks(this)
  .strictness(Strictness.STRICT_STUBS)
  .startMocking();

to enable strict mocking.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions