ArcBees / Jukito

The combined power of JUnit, Guice and Mockito. Plus it sounds like a cool martial art.

Home Page:http://jukito.arcbees.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guice modules configured twice

aldenquimby opened this issue · comments

When using @UseModules and @RunWith(JukitoRunner.class), the method JukitoRunner#ensureInjector configures all guice modules twice.

It looks like a second test module is created and configured to "collect bindings," and it appears to be intentional based on this comment.

Is this necessary? Is there any way to reuse the existing test module? It's pretty confusing to have every registered module configured twice.

Closing this. It looks like it's possible to collect the bindings from the injector (instead of using Elements.getElements, but then there's no way to set up additional bindings without making a child injector, and child injectors have a slew of other possible issues