use of org.drools.drl.ast.descr.EvalDescr in project drools by kiegroup.
the class RuleParserTest method testEvalMultiple.
@Test
public void testEvalMultiple() throws Exception {
final PackageDescr pkg = (PackageDescr) parseResource("compilationUnit", "eval_multiple.drl");
assertEquals(1, pkg.getRules().size());
final RuleDescr rule = (RuleDescr) pkg.getRules().get(0);
assertEquals(4, rule.getLhs().getDescrs().size());
final EvalDescr eval = (EvalDescr) rule.getLhs().getDescrs().get(0);
assertEqualsIgnoreWhitespace("abc(\"foo\") + 5", (String) eval.getContent());
final PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get(1);
assertEquals("Foo", pattern.getObjectType());
}
Aggregations