use of se.jbee.inject.UnresolvableDependency.NoResourceForDependency in project silk by jbee.
the class TestRequiredProvidedBinds method thatUnusedProvidedBindIsNotAddedToInjectorContext.
@Test
public void thatUnusedProvidedBindIsNotAddedToInjectorContext() {
Injector injector = Bootstrap.injector(RequiredProvidedBindsBundle.class);
try {
injector.resolve(dependency(UnusedImpl.class));
fail("Should not be bound and therefore throw below exception");
} catch (NoResourceForDependency e) {
// expected this
} catch (Throwable e) {
fail("Expected another exception but got: " + e);
}
}
Aggregations