-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 @InjectMock with @Mock in MockitoExtension #5
Comments
@smoyer64, thanks so much for raising the issue with the Mockito team! 👍 That's something we've been meaning to do for almost half a year now but kept forgetting to follow up on. 😉 |
No problem ... until I'm competent with the core JUnit 5 code, I figure there are other ways I can help. Since you've stated several times that the MockitoExtension is not production code, I figured there had been compromises ... if it bugs me, it probably bugs other people. In any case, JUnitParams and Mockito are two libraries I use in almost every project - and they have been able to run together since mock injection could be done via a @rule (JUnitParams has to be a runner to overcome the prohibition against test methods having parameters). In any case, I'd also love to create a JUnitParamsExtension but JUnit 5 isn't quite ready for it. I'm working on a proposal with a corresponding PoC for a couple callbacks that will make the JUnitParamsExtension possible:
It's not completely altruistic - I also need something like this for upREST. |
Sounds good. Keep us posted on your progress! |
Resolved in 039d920. |
It would be cleaner to use
@Mock
instead of JUnit's custom@InjectMock
annotation to request mock creation for bothFIELD
andPARAMETER
declarations.This feature request is currently blocked by mockito/mockito#438.
The text was updated successfully, but these errors were encountered: