assertTrue(dcp.hasNextCommand());
}
@Test public void testEvaluatedSetCriteria() throws Exception {
DependentAccessNode dan = new DependentAccessNode(0);
CommandContext cc = new CommandContext();
dan.setContext(cc);
List<Reference> references = Arrays.asList(new Reference(1), new Reference(2));
for (Reference reference : references) {
cc.getVariableContext().setGlobalValue(reference.getContextSymbol(), 1);
}
SetCriteria sc = new SetCriteria(new ElementSymbol("e1"), references); //$NON-NLS-1$
DependentCriteriaProcessor dcp = new DependentCriteriaProcessor(1, -1, dan, sc);
Criteria result = dcp.prepareCriteria();
assertEquals(new CompareCriteria(new ElementSymbol("e1"), CompareCriteria.EQ, new Constant(1)), result); //$NON-NLS-1$