use of org.neo4j.graphdb.traversal.PruneEvaluator in project graphdb by neo4j-attic.
the class TestMultiPruneEvaluators method makeSurePruneIsntCalledForStartNode.
@Test
public void makeSurePruneIsntCalledForStartNode() {
final boolean[] calledForStartPosition = new boolean[1];
PruneEvaluator evaluator = new PruneEvaluator() {
public boolean pruneAfter(Path position) {
if (position.length() == 0) {
calledForStartPosition[0] = true;
}
return false;
}
};
IteratorUtil.lastOrNull(Traversal.description().prune(evaluator).traverse(referenceNode()));
assertFalse(calledForStartPosition[0]);
}
Aggregations