Skip to content

v0.11.0

Choose a tag to compare

@github-actions github-actions released this 15 Jul 08:18
· 83 commits to main since this release

Added

  • #53: Added an inspection to report when the mocked type and the type of the spied instance don't match in a mock(Type.class, withSettings().spiedInstance(...));-type mock creation.
  • #56: Added an inspection to report spying on mock objects, i.e. Mockito.spy(Mockito.mock(...)) and Mockito.spy(<object annotated with @Mock>).
  • #57: Added an inspection to report arguments passed into Mockito.mock() and Mockito.spy() which are designed to determine the mock type based on the variable's type they are assigned to, and not by the type passed into them. See Mocking/spying without specifying class.
  • #58: Added an inspection to report MockSettings-based mock creations that have convenience methods or simpler variants to create the mock.
  • #59: Added an intention action to expand simple mock and spy creation calls to use specific MockSettings, for example Mockito.mock(<type>, <answer>) is converted to Mockito.mock(<type>, Mockito.withSettings().defaultAnswer(<answer>)).

Changed

  • Plugin configuration updates, and code improvements specific to migrating from Java 11 to 17.