Search in sources :

Example 16 with InMemoryModule

use of com.google.gerrit.testing.InMemoryModule in project gerrit by GerritCodeReview.

the class FakeQueryAccountsTest 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));
}
Also used : Config(org.eclipse.jgit.lib.Config) IndexConfig(com.google.gerrit.testing.IndexConfig) InMemoryModule(com.google.gerrit.testing.InMemoryModule)

Example 17 with InMemoryModule

use of com.google.gerrit.testing.InMemoryModule in project gerrit by GerritCodeReview.

the class LuceneQueryAccountsTest method createInjector.

@Override
protected Injector createInjector() {
    Config luceneConfig = new Config(config);
    InMemoryModule.setDefaults(luceneConfig);
    return Guice.createInjector(new InMemoryModule(luceneConfig));
}
Also used : Config(org.eclipse.jgit.lib.Config) IndexConfig(com.google.gerrit.testing.IndexConfig) InMemoryModule(com.google.gerrit.testing.InMemoryModule)

Example 18 with InMemoryModule

use of com.google.gerrit.testing.InMemoryModule in project gerrit by GerritCodeReview.

the class FakeQueryProjectsTest 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));
}
Also used : Config(org.eclipse.jgit.lib.Config) IndexConfig(com.google.gerrit.testing.IndexConfig) InMemoryModule(com.google.gerrit.testing.InMemoryModule)

Example 19 with InMemoryModule

use of com.google.gerrit.testing.InMemoryModule in project gerrit by GerritCodeReview.

the class AllProjectsCreatorTest method setUp.

@Before
public void setUp() throws Exception {
    InMemoryModule inMemoryModule = new InMemoryModule();
    inMemoryModule.inject(this);
    // Creates an empty All-Projects.
    try (Repository repo = repoManager.createRepository(allProjectsName)) {
    // Intentionally empty.
    }
}
Also used : Repository(org.eclipse.jgit.lib.Repository) InMemoryModule(com.google.gerrit.testing.InMemoryModule) Before(org.junit.Before)

Aggregations

InMemoryModule (com.google.gerrit.testing.InMemoryModule)19 Before (org.junit.Before)11 Injector (com.google.inject.Injector)9 Config (org.eclipse.jgit.lib.Config)9 IndexConfig (com.google.gerrit.testing.IndexConfig)6 LifecycleManager (com.google.gerrit.lifecycle.LifecycleManager)2 Repository (org.eclipse.jgit.lib.Repository)2 ImmutableSet (com.google.common.collect.ImmutableSet)1 Account (com.google.gerrit.entities.Account)1 AccountGroup (com.google.gerrit.entities.AccountGroup)1 LabelType (com.google.gerrit.entities.LabelType)1 CacheModule (com.google.gerrit.server.cache.CacheModule)1 MetaDataUpdate (com.google.gerrit.server.git.meta.MetaDataUpdate)1 ProjectConfig (com.google.gerrit.server.project.ProjectConfig)1 TypeLiteral (com.google.inject.TypeLiteral)1 Optional (java.util.Optional)1 Set (java.util.Set)1 DfsRepositoryDescription (org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription)1 InMemoryRepository (org.eclipse.jgit.internal.storage.dfs.InMemoryRepository)1 TestRepository (org.eclipse.jgit.junit.TestRepository)1