public void shouldParseConstraintFromStringWithIsDescendantNodeExpressionWithPathOnlyIfThereIsOneSelectorSource() {
NamedSelector selector = new NamedSelector(selectorName("tableA"));
Constraint constraint = parser.parseConstraint(tokens("ISDESCENDANTNODE('/a/b/c')"), typeSystem, selector);
assertThat(constraint, is(instanceOf(DescendantNode.class)));
DescendantNode descendant = (DescendantNode)constraint;
assertThat(descendant.selectorName(), is(selectorName("tableA")));
assertThat(descendant.getAncestorPath(), is("/a/b/c"));
}
@Test
public void shouldParseConstraintFromStringWithIsDescendantNodeExpressionWithSelectorNameAndPath() {