use of org.locationtech.geogig.storage.memory.HeapObjectDatabse in project GeoGig by boundlessgeo.
the class MutableTreeTest method testBuild.
@Test
@Ignore
public void testBuild() {
ObjectDatabase origin = new HeapObjectDatabse();
origin.open();
ObjectDatabase target = new HeapObjectDatabse();
target.open();
RevTree tree = root.build(origin, target);
Iterator<NodeRef> treeRefs = new DepthTreeIterator("", ObjectId.NULL, tree, target, Strategy.RECURSIVE_TREES_ONLY);
MutableTree createFromRefs = MutableTree.createFromRefs(root.getNode().getObjectId(), treeRefs);
// TODO finish
}
use of org.locationtech.geogig.storage.memory.HeapObjectDatabse in project GeoGig by boundlessgeo.
the class PreOrderDiffWalkTest method beforeTest.
@Before
public void beforeTest() {
leftSource = new HeapObjectDatabse();
rightSource = new HeapObjectDatabse();
leftSource.open();
rightSource.open();
consumer = mock(Consumer.class);
}
use of org.locationtech.geogig.storage.memory.HeapObjectDatabse in project GeoGig by boundlessgeo.
the class InitOpTest method setUp.
@Before
public void setUp() throws IOException, RepositoryConnectionException {
injector = mock(Context.class);
mockRefParse = mock(RefParse.class);
when(mockRefParse.setName(anyString())).thenReturn(mockRefParse);
mockUpdateRef = mock(UpdateRef.class);
when(mockUpdateRef.setName(anyString())).thenReturn(mockUpdateRef);
when(mockUpdateRef.setDelete(anyBoolean())).thenReturn(mockUpdateRef);
when(mockUpdateRef.setNewValue((ObjectId) anyObject())).thenReturn(mockUpdateRef);
when(mockUpdateRef.setOldValue((ObjectId) anyObject())).thenReturn(mockUpdateRef);
when(mockUpdateRef.setReason(anyString())).thenReturn(mockUpdateRef);
mockUpdateSymRef = mock(UpdateSymRef.class);
when(mockUpdateSymRef.setName(anyString())).thenReturn(mockUpdateSymRef);
when(mockUpdateSymRef.setDelete(anyBoolean())).thenReturn(mockUpdateSymRef);
when(mockUpdateSymRef.setNewValue(anyString())).thenReturn(mockUpdateSymRef);
when(mockUpdateSymRef.setOldValue(anyString())).thenReturn(mockUpdateSymRef);
when(mockUpdateSymRef.setReason(anyString())).thenReturn(mockUpdateSymRef);
when(injector.command(eq(RefParse.class))).thenReturn(mockRefParse);
when(injector.command(eq(UpdateRef.class))).thenReturn(mockUpdateRef);
when(injector.command(eq(UpdateSymRef.class))).thenReturn(mockUpdateSymRef);
platform = mock(Platform.class);
when(injector.platform()).thenReturn(platform);
defaults = PluginDefaults.NO_PLUGINS;
init = new InitOp(defaults);
init.setContext(injector);
mockRepo = mock(Repository.class);
objectDatabase = new HeapObjectDatabse();
when(mockRepo.objectDatabase()).thenReturn(objectDatabase);
Mockito.doAnswer(new Answer<Void>() {
@Override
public Void answer(InvocationOnMock invocation) throws Throwable {
objectDatabase.open();
return null;
}
}).when(mockRepo).open();
workingDir = tempFolder.getRoot();
when(platform.pwd()).thenReturn(workingDir);
}
use of org.locationtech.geogig.storage.memory.HeapObjectDatabse in project GeoGig by boundlessgeo.
the class PostOrderDiffWalkTest method beforeTest.
@Before
public void beforeTest() {
leftSource = new HeapObjectDatabse();
rightSource = new HeapObjectDatabse();
leftSource.open();
rightSource.open();
testConsumer = new TestConsumer();
}
use of org.locationtech.geogig.storage.memory.HeapObjectDatabse in project GeoGig by boundlessgeo.
the class DepthTreeIteratorTest method setUp.
@Before
public void setUp() {
source = new HeapObjectDatabse();
source.open();
metadataId = ObjectId.forString("fake id");
treePath = "";
emptyTree = RevTree.EMPTY;
featuresLeafTree = createFeaturesTree(source, "featuresLeafTree", 100).build();
assertTrue(featuresLeafTree.features().isPresent());
treesLeafTree = createTreesTree(source, 100, 10, metadataId).build();
assertTrue(treesLeafTree.trees().isPresent());
RevTreeBuilder builder = createTreesTree(source, 10, 10, metadataId);
for (int i = 0; i < 100; i++) {
builder.put(featureNode("feature.", i));
}
mixedLeafTree = builder.build();
featuresBucketsTree = createFeaturesTree(source, "feature.", 25000).build();
}
Aggregations