" acc( Cheese( $price : price ),\n" +
" $v1 : baz( $price ), \n" +
" $v2 : baz2( $price ) )\n" +
"then\n" +
"end\n";
final PackageDescr pkg = (PackageDescr) parse( "compilationUnit",
drl );
assertEquals( 2,
pkg.getAccumulateImports().size() );
AccumulateImportDescr imp = (AccumulateImportDescr) pkg.getAccumulateImports().get(0);
assertEquals( "foo.Bar",
imp.getTarget() );
assertEquals( "baz",
imp.getFunctionName() );
imp = (AccumulateImportDescr) pkg.getAccumulateImports().get(1);
assertEquals( "foo.Bar2",
imp.getTarget() );
assertEquals( "baz2",
imp.getFunctionName() );
assertEquals( 1,
pkg.getRules().size() );
RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
assertEquals( 1,
rule.getLhs().getDescrs().size() );
PatternDescr out = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
assertEquals( "Object[]",