Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspection: report spying on mock #56

Closed
picimako opened this issue Jul 3, 2023 · 1 comment
Closed

Inspection: report spying on mock #56

picimako opened this issue Jul 3, 2023 · 1 comment
Assignees
Labels
feature New functionality
Milestone

Comments

@picimako
Copy link
Owner

picimako commented Jul 3, 2023

Summary

Mockito 5.4.0 throws an exception when a mock object is passed into Mockito.spy(). See

Tasks

  • Implement an inspection that can detect Mockito.spy() being passed in a mock object. Constructs can be like:
    • Mockito.spy(Mockito.mock(Type.class))
    • Mockito.spy(<object annotated with @Mock>)

Questions

  • Should it check spies passed into Mockito.spy() as well?
@picimako picimako added the feature New functionality label Jul 3, 2023
@picimako picimako self-assigned this Jul 11, 2023
@picimako
Copy link
Owner Author

Completed in v0.11.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

No branches or pull requests

1 participant