use of com.google.gerrit.testing.InMemoryModule in project gerrit by GerritCodeReview.
the class OpenIdRealmTest method setUpInjector.
@Before
public void setUpInjector() throws Exception {
Injector injector = Guice.createInjector(new InMemoryModule());
injector.injectMembers(this);
}
use of com.google.gerrit.testing.InMemoryModule in project gerrit by GerritCodeReview.
the class LdapRealmTest method setUpInjector.
@Before
public void setUpInjector() throws Exception {
Injector injector = Guice.createInjector(new InMemoryModule(), new CacheModule() {
@Override
protected void configure() {
cache(GROUP_CACHE, String.class, new TypeLiteral<Set<AccountGroup.UUID>>() {
}).loader(LdapRealm.MemberLoader.class);
cache(USERNAME_CACHE, String.class, new TypeLiteral<Optional<Account.Id>>() {
}).loader(LdapRealm.UserLoader.class);
cache(GROUP_EXIST_CACHE, String.class, new TypeLiteral<Boolean>() {
}).loader(LdapRealm.ExistenceLoader.class);
cache(PARENT_GROUPS_CACHE, String.class, new TypeLiteral<ImmutableSet<String>>() {
});
}
});
injector.injectMembers(this);
}
use of com.google.gerrit.testing.InMemoryModule in project gerrit by GerritCodeReview.
the class DiffOperationsTest method setUpInjector.
@Before
public void setUpInjector() throws Exception {
Injector injector = Guice.createInjector(new InMemoryModule());
injector.injectMembers(this);
repo = repoManager.createRepository(testProjectName);
}
use of com.google.gerrit.testing.InMemoryModule in project gerrit by GerritCodeReview.
the class FakeQueryChangesTest method createInjector.
@Override
protected Injector createInjector() {
Config fakeConfig = new Config(config);
InMemoryModule.setDefaults(fakeConfig);
fakeConfig.setString("index", null, "type", "fake");
return Guice.createInjector(new InMemoryModule(fakeConfig));
}
use of com.google.gerrit.testing.InMemoryModule in project gerrit by GerritCodeReview.
the class FakeQueryGroupsTest method createInjector.
@Override
protected Injector createInjector() {
Config fakeConfig = new Config(config);
InMemoryModule.setDefaults(fakeConfig);
fakeConfig.setString("index", null, "type", "fake");
return Guice.createInjector(new InMemoryModule(fakeConfig));
}
Aggregations