"db.other.driver", "org.h2.Driver",
"db.other.url", "jdbc:h2:mem:other"
);
running(fakeApplication(config), new Runnable() {
public void run() {
Injector injector = play.api.Play.current().injector();
assertThat(injector.instanceOf(DefaultComponent.class).db.getUrl(), equalTo("jdbc:h2:mem:other"));
assertThat(injector.instanceOf(NamedOtherComponent.class).db.getUrl(), equalTo("jdbc:h2:mem:other"));
exception.expect(com.google.inject.ConfigurationException.class);
injector.instanceOf(NamedDefaultComponent.class);
}
});
}