use of org.locationtech.geogig.api.MemoryModule in project GeoGig by boundlessgeo.
the class ParseTimestampTest method setUp.
@Before
public void setUp() {
File workingDirectory = tempFolder.newFolder("mockWorkingDir");
Platform testPlatform = new TestPlatform(workingDirectory) {
@Override
public long currentTimeMillis() {
return REFERENCE_DATE.getTime();
}
};
Context injector = Guice.createInjector(Modules.override(new GeogigModule()).with(new MemoryModule(testPlatform))).getInstance(Context.class);
fakeGeogig = new GeoGIG(injector, workingDirectory);
assertNotNull(fakeGeogig.getOrCreateRepository());
command = fakeGeogig.command(ParseTimestamp.class);
}
use of org.locationtech.geogig.api.MemoryModule in project GeoGig by boundlessgeo.
the class DepthSearchTest method setUp.
@Before
public void setUp() throws IOException {
File envHome = tempFolder.getRoot();
Platform testPlatform = new TestPlatform(envHome);
Context injector = Guice.createInjector(Modules.override(new GeogigModule()).with(new MemoryModule(testPlatform))).getInstance(Context.class);
fakeGeogig = new GeoGIG(injector);
Repository fakeRepo = fakeGeogig.getOrCreateRepository();
odb = fakeRepo.objectDatabase();
search = new DepthSearch(odb);
RevTreeBuilder root = new RevTreeBuilder(odb);
root = addTree(root, "path/to/tree1", "node11", "node12", "node13");
root = addTree(root, "path/to/tree2", "node21", "node22", "node23");
root = addTree(root, "tree3", "node31", "node32", "node33");
RevTree rootTree = root.build();
odb.put(rootTree);
rootTreeId = rootTree.getId();
}
use of org.locationtech.geogig.api.MemoryModule in project GeoGig by boundlessgeo.
the class DiffTreeTest method setUp.
@Before
public void setUp() throws Exception {
File workingDirectory = tempFolder.newFolder("mockWorkingDir");
Platform testPlatform = new TestPlatform(workingDirectory);
Context injector = Guice.createInjector(Modules.override(new GeogigModule()).with(new MemoryModule(testPlatform))).getInstance(Context.class);
geogit = new GeoGIG(injector);
assertNotNull(geogit.getOrCreateRepository());
diffTree = geogit.command(DiffTree.class);
SimpleFeatureType ft = DataUtilities.createType("points", "sp:String,ip:Integer,pp:Point:srid=3857");
revtype = RevFeatureTypeImpl.build(ft);
metadataId = revtype.getId();
geogit.getContext().objectDatabase().put(revtype);
}
use of org.locationtech.geogig.api.MemoryModule 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);
}
Aggregations