public void shouldParseDynamicOperandFromStringContainingChildCountWithNoSelectorOnlyIfThereIsOneSelectorAsSource() {
Source source = new NamedSelector(selectorName("tableA"));
DynamicOperand operand = parser.parseDynamicOperand(tokens("CHILDCOUNT()"), typeSystem, source);
assertThat(operand, is(instanceOf(ChildCount.class)));
ChildCount count = (ChildCount)operand;
assertThat(count.selectorName(), is(selectorName("tableA")));
}
@Test( expected = ParsingException.class )
public void shouldFailToParseDynamicOperandFromStringContainingChildCountWithNoSelectorIfTheSourceIsNotASelector() {
parser.parseDynamicOperand(tokens("CHILDCOUNT()"), typeSystem, mock(Source.class));