Skip to content

Inspection: Suspicious call on MockitoAnnotations.openMocks() #54

@picimako

Description

@picimako

Summary

There are certain JUnit4 runners and JUnit5 extensions that initialize the mocks and spies in the test class. In those cases calling MockitoAnnotations.openMocks() may be unnecessary, at least suspicious.

Tasks

  • Create an inspection that can detect JUnit4 runners and JUnit5 extensions on a test class, used in conjunction with MockitoAnnotations.openMocks().

Questions

  • Check if and how superclasses need to be taken into account from both JUnit side and calling openMocks() side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions