Skip to content

Inspection "Explizit Initialization"on @Injectmocks should not be shown on Interface types #69

@boli14

Description

@boli14

In Issue #55 there was Inspection introduced an Inspection that shows up, if there is an object annoted with @Injectmocks explizitly constructed with a default constructor. IE in the following case.

@InjectMocks
private Collection<String> collection = new ArrayList();

However normally i want to test my given class as an implementation of an interface. So in the above example I want to test ArrayList as a Collection and not as an ArrayList..

So my request is: The warning should not be shown for interfaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions