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

Method testCombineIterable

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

Source from the content-addressed store, hash-verified

34 }
35
36 public void testCombineIterable() {
37 Iterable<Module> modules = Arrays.asList(newModule(1), newModule(2L), newModule((short) 3));
38 Injector injector = Guice.createInjector(Modules.combine(modules));
39 assertEquals(1, injector.getInstance(Integer.class).intValue());
40 assertEquals(2, injector.getInstance(Long.class).longValue());
41 assertEquals(3, injector.getInstance(Short.class).shortValue());
42 }
43
44 /** The module returned by Modules.combine shouldn't show up in binder sources. */
45 public void testCombineSources() {

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected