2

In the JUnit 5 user guide we can find a link to MockitoExtension, as an usage example of TestInstancePostProcessor, ParameterResolver (part of the Extension API).

My doubt is about the real usage of Mockito in JUnit 5 (related to this other question).

  • As of now, is that MockitoExtension the recommended way to inject mocks within Jupiter tests?
  • If so, should I include a copy of that class in my project and then use it? (not the best way I guess)
  • Is there any plan to support an official Mockito extension for JUnit 5?

Thank you so much!

Boni García
  • 4,618
  • 5
  • 28
  • 44
  • 3
    I'm a maintainer of the new and so far unreleased project [JUnit Pioneer](https://github.com/junit-pioneer/junit-pioneer). We actually [plan to polish and release the Mockito extension prototype](https://github.com/junit-pioneer/junit-pioneer/issues/43) to make it easily available until Mockito developed their own. – Nicolai Parlog Jun 07 '17 at 17:39
  • @Nicolai Any updates? – Snekse Dec 07 '17 at 21:19

0 Answers0