Skip to content

Guice injector in JUnit tests [closed]

Using Guice, is it a good practice to get a new injector in each JUnit test class, as each test class should be independant?


Take a look at Guice Berry.

I won’t recommend using it now (documentation is really terrible), but looking at their approach can make you think clear about how DI should be done in jUnit.