right.getObjectType() );
assertEquals( 1,
left.getConstraint().getDescrs().size() );
ExprConstraintDescr fld = (ExprConstraintDescr) left.getConstraint().getDescrs().get( 0 );
assertEquals( "name == \"mark\"",
fld.getExpression() );
assertEquals( 1,
right.getConstraint().getDescrs().size() );
fld = (ExprConstraintDescr) right.getConstraint().getDescrs().get( 0 );
assertEquals( "type == \"stilton\"",
fld.getExpression() );
// now the "||" part
final OrDescr or = (OrDescr) and.getDescrs().get( 2 );
assertEquals( 2,
or.getDescrs().size() );
left = (PatternDescr) or.getDescrs().get( 0 );
right = (PatternDescr) or.getDescrs().get( 1 );
assertEquals( "Person",
left.getObjectType() );
assertEquals( "Cheese",
right.getObjectType() );
assertEquals( 1,
left.getConstraint().getDescrs().size() );
fld = (ExprConstraintDescr) left.getConstraint().getDescrs().get( 0 );
assertEquals( "name == \"mark\"",
fld.getExpression() );
assertEquals( 1,
right.getConstraint().getDescrs().size() );
fld = (ExprConstraintDescr) right.getConstraint().getDescrs().get( 0 );
assertEquals( "type == \"stilton\"",
fld.getExpression() );
assertEqualsIgnoreWhitespace( "System.out.println( \"Mark and Michael\" );",
(String) rule.getConsequence() );
}