use of javax.jcr.query.qom.SameNodeJoinCondition in project jackrabbit by apache.
the class QueryObjectModelFactoryTest method testSameNodeJoinCondition.
/**
* Test case for {@link QueryObjectModelFactory#sameNodeJoinCondition(String, String, String)}
*/
public void testSameNodeJoinCondition() throws RepositoryException {
SameNodeJoinCondition cond = qf.sameNodeJoinCondition(SELECTOR_NAME1, SELECTOR_NAME2, ".");
assertEquals("Wrong selector name", SELECTOR_NAME1, cond.getSelector1Name());
assertEquals("Wrong selector name", SELECTOR_NAME2, cond.getSelector2Name());
assertEquals("Wrong selector path", ".", cond.getSelector2Path());
}
use of javax.jcr.query.qom.SameNodeJoinCondition in project jackrabbit by apache.
the class QueryObjectModelFactoryTest method testSameNodeJoinConditionWithPath.
/**
* Test case for {@link QueryObjectModelFactory#sameNodeJoinCondition(String, String, String)}
*/
public void testSameNodeJoinConditionWithPath() throws RepositoryException {
SameNodeJoinCondition cond = qf.sameNodeJoinCondition(SELECTOR_NAME1, SELECTOR_NAME2, nodeName1);
assertEquals("Wrong selector name", SELECTOR_NAME1, cond.getSelector1Name());
assertEquals("Wrong selector name", SELECTOR_NAME2, cond.getSelector2Name());
assertEquals("Wrong path", nodeName1, cond.getSelector2Path());
}
use of javax.jcr.query.qom.SameNodeJoinCondition in project jackrabbit-oak by apache.
the class QomTest method sameNodeJoinCondition.
@Test
public void sameNodeJoinCondition() throws RepositoryException {
SameNodeJoinCondition s = f.sameNodeJoinCondition("selector1Name", "selector2Name", "selector2Path");
assertEquals("selector1Name", s.getSelector1Name());
assertEquals("selector2Name", s.getSelector2Name());
assertEquals("selector2Path", s.getSelector2Path());
assertEquals("ISSAMENODE([selector1Name], [selector2Name], [selector2Path])", s.toString());
}
Aggregations