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

Method assertDistinct

core/test/com/google/inject/BindingTest.java:410–416  ·  view source on GitHub ↗
(Injector injector, int expectedCount, Key<?>... keys)

Source from the content-addressed store, hash-verified

408 }
409
410 public void assertDistinct(Injector injector, int expectedCount, Key<?>... keys) {
411 ImmutableSet.Builder<Object> builder = ImmutableSet.builder();
412 for (Key<?> k : keys) {
413 builder.add(injector.getInstance(k));
414 }
415 assertEquals(expectedCount, builder.build().size());
416 }
417
418 @Test
419 public void testToConstructorSpiData() throws NoSuchMethodException {

Callers 1

Calls 5

getInstanceMethod · 0.65
buildMethod · 0.65
builderMethod · 0.45
addMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected