SimpleInjectionConfig implements InjectionConfig { @Override public ConstructorSelector provideConstructorSelector() { return mConstructorSelector; }  @Override ConstructorSelector provideConstructorSelector(); @Override List<Class<? extends Annotation>> provideInjectableFieldAnnotations(); @Override List<Class<? extends Annotation>> provideInjectableMethodAnnotations();  }
@Test public void testFailWithNoConstructor() { Constructor<TestInterface> constructor = mSimpleInjectionConfig.provideConstructorSelector() .chooseConstructor(TypeToken.of(TestInterface.class)); assertThat(constructor).isNull(); }
@Test public void testFindSmalledConstructor() { Constructor<TestClass1> constructor1 = mSimpleInjectionConfig.provideConstructorSelector() .chooseConstructor(TypeToken.of(TestClass1.class)); Constructor<TestClass2> constructor2 = mSimpleInjectionConfig.provideConstructorSelector() .chooseConstructor(TypeToken.of(TestClass2.class)); assertThat(constructor1.getParameterCount()).isEqualTo(1); assertThat(constructor2.getParameterCount()).isEqualTo(0); }