DependencyInjector
DependencyInjector copied to clipboard
Cannot mock injector
For what it's worth, the following does not work:
@RunWith(DelayedInjectionRunner.class)
public class MyTest {
@Mock
private Injector injector;
}
Delayed injection runner is using an injector internally, and then tries to register the mock Injector field with the injector. But the real injector in the test runner already registered itself...