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

Replace #initMocks with MockitoRule #3805

Closed
wants to merge 1 commit into from

Conversation

marschall
Copy link
Contributor

@marschall marschall commented Nov 15, 2020

Replace all references of MockitoAnnotations#initMocks with the
MockitoRule JUnit rule.

MockitoAnnotations#initMocks is deprecated with MockitoAnnotations#openMocks was a replacement. However #openMocks requires closing in an @after method. Using MockitoRule is easier as it automatically closes the mocks after the test.

@fmbenhassine fmbenhassine removed the status: waiting-for-triage Issues that we did not analyse yet label Jan 21, 2021
@fmbenhassine fmbenhassine added this to the 5.0.0 milestone Jan 21, 2021
@marschall marschall force-pushed the initMocks branch 2 times, most recently from 0fb0e41 to f35ddb2 Compare March 13, 2021 18:15
Replace all references of MockitoAnnotations#initMocks with the
MockitoRule JUnit rule.
@fmbenhassine
Copy link
Contributor

Rebased and merged as 2aa94d0 which partially resolves #3838 . Thank you for your contribution!

@fmbenhassine fmbenhassine modified the milestones: 5.0.0, 5.0.0-M1 Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants