use of org.locationtech.geogig.api.Bounded in project GeoGig by boundlessgeo.
the class PostOrderDiffWalkTest method testBucketBucketFlat.
@Test
public void testBucketBucketFlat() {
RevTree left = createFeaturesTree(leftSource, "f", RevTree.NORMALIZED_SIZE_LIMIT + 1).build();
RevTree right = createFeaturesTree(rightSource, "f", RevTree.NORMALIZED_SIZE_LIMIT + 2).build();
PostOrderDiffWalk visitor = new PostOrderDiffWalk(left, right, leftSource, rightSource);
visitor.walk(testConsumer);
List<Bounded> leftCalls = testConsumer.orderedLeft;
List<Bounded> rightCalls = testConsumer.orderedRight;
// System.err.println(leftCalls);
// System.err.println(rightCalls);
Node lroot = nodeFor(left);
Node rroot = nodeFor(right);
assertEquals(3, leftCalls.size());
assertEquals(3, rightCalls.size());
assertNull(leftCalls.get(0));
assertTrue(leftCalls.get(1) instanceof Bucket);
assertEquals(lroot, leftCalls.get(2));
assertEquals(rroot, rightCalls.get(2));
assertTrue(rightCalls.get(1) instanceof Bucket);
assertTrue(rightCalls.get(0) instanceof Node);
assertEquals(RevObject.TYPE.FEATURE, ((Node) rightCalls.get(0)).getType());
}
Aggregations