Skip to content
Advertisement

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?

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement