Search in sources :

Example 6 with GeogigModule

use of org.locationtech.geogig.di.GeogigModule in project GeoGig by boundlessgeo.

the class WriteBackTest method setUp.

@Before
public void setUp() {
    Context injector = Guice.createInjector(Modules.override(new GeogigModule()).with(new MemoryModule(null))).getInstance(Context.class);
    odb = injector.objectDatabase();
    indexDb = injector.stagingDatabase();
    odb.open();
    indexDb.open();
    writeBack = injector.command(WriteBack.class);
}
Also used : Context(org.locationtech.geogig.api.Context) GeogigModule(org.locationtech.geogig.di.GeogigModule) MemoryModule(org.locationtech.geogig.api.MemoryModule) Before(org.junit.Before)

Example 7 with GeogigModule

use of org.locationtech.geogig.di.GeogigModule in project GeoGig by boundlessgeo.

the class MongoCommitOpTest method createInjector.

@Override
protected Context createInjector() {
    File workingDirectory;
    try {
        workingDirectory = mockWorkingDirTempFolder.getRoot();
    } catch (Exception e) {
        throw Throwables.propagate(e);
    }
    Platform testPlatform = new TestPlatform(workingDirectory);
    return Guice.createInjector(Modules.override(new GeogigModule()).with(new MongoTestStorageModule(), new TestModule(testPlatform))).getInstance(Context.class);
}
Also used : TestPlatform(org.locationtech.geogig.api.TestPlatform) Platform(org.locationtech.geogig.api.Platform) TestPlatform(org.locationtech.geogig.api.TestPlatform) File(java.io.File) GeogigModule(org.locationtech.geogig.di.GeogigModule)

Example 8 with GeogigModule

use of org.locationtech.geogig.di.GeogigModule in project GeoGig by boundlessgeo.

the class MongoConflictsTest method createInjector.

@Override
protected Context createInjector() {
    File workingDirectory;
    try {
        workingDirectory = mockWorkingDirTempFolder.getRoot();
    } catch (Exception e) {
        throw Throwables.propagate(e);
    }
    Platform testPlatform = new TestPlatform(workingDirectory);
    return Guice.createInjector(Modules.override(new GeogigModule()).with(new MongoTestStorageModule(), new TestModule(testPlatform))).getInstance(Context.class);
}
Also used : TestPlatform(org.locationtech.geogig.api.TestPlatform) Platform(org.locationtech.geogig.api.Platform) TestPlatform(org.locationtech.geogig.api.TestPlatform) File(java.io.File) GeogigModule(org.locationtech.geogig.di.GeogigModule)

Aggregations

GeogigModule (org.locationtech.geogig.di.GeogigModule)8 File (java.io.File)6 Platform (org.locationtech.geogig.api.Platform)6 TestPlatform (org.locationtech.geogig.api.TestPlatform)6 Context (org.locationtech.geogig.api.Context)5 Before (org.junit.Before)4 MemoryModule (org.locationtech.geogig.api.MemoryModule)4 GeoGIG (org.locationtech.geogig.api.GeoGIG)3 RevTree (org.locationtech.geogig.api.RevTree)1 RevTreeBuilder (org.locationtech.geogig.api.RevTreeBuilder)1 CLIContextBuilder (org.locationtech.geogig.cli.CLIContextBuilder)1 PluginsModule (org.locationtech.geogig.di.PluginsModule)1 CachingModule (org.locationtech.geogig.di.caching.CachingModule)1 SimpleFeatureType (org.opengis.feature.simple.SimpleFeatureType)1