checkResult(qom.execute(), new Node[][]{{n2, n1}, {null, n2}});
}
public void testLeftOuterJoin() throws RepositoryException {
JoinCondition c = qomFactory.descendantNodeJoinCondition(LEFT, RIGHT);
QueryObjectModel qom = createQuery(JOIN_TYPE_LEFT_OUTER, c);
List result = new ArrayList();
result.add(new Node[]{n2, n1});
// for each ancestor-or-self of testRootNode check
// whether it is of type testNodeType and add
// two matches in that case
Node n = testRootNode;
for (;;) {
if (n.isNodeType(testNodeType)) {
result.add(new Node[]{n1, n});
result.add(new Node[]{n2, n});
}
if (n.getDepth() == 0) {
break;
} else {
n = n.getParent();
}
}
if (result.size() == 1) {
// n1 not yet covered
result.add(new Node[]{n1, null});
}
checkResult(qom.execute(), (Node[][]) result.toArray(new Node[result.size()][]));
}