MCPcopy Create free account
hub / github.com/google/guice / testCombineVarargs

Method testCombineVarargs

core/test/com/google/inject/ModulesTest.java:28–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26public class ModulesTest extends TestCase {
27
28 public void testCombineVarargs() {
29 Module combined = Modules.combine(newModule(1), newModule(2L), newModule((short) 3));
30 Injector injector = Guice.createInjector(combined);
31 assertEquals(1, injector.getInstance(Integer.class).intValue());
32 assertEquals(2L, injector.getInstance(Long.class).longValue());
33 assertEquals(3, injector.getInstance(Short.class).shortValue());
34 }
35
36 public void testCombineIterable() {
37 Iterable<Module> modules = Arrays.asList(newModule(1), newModule(2L), newModule((short) 3));

Callers

nothing calls this directly

Calls 4

combineMethod · 0.95
newModuleMethod · 0.95
createInjectorMethod · 0.95
getInstanceMethod · 0.95

Tested by

no test coverage detected