assertEquals( "items",
fcfp.getFactPattern().getBoundName() );
assertEquals( 1,
fcfp.getFactPattern().getNumberOfConstraints() );
assertTrue( fcfp.getFactPattern().getConstraint( 0 ) instanceof SingleFieldConstraint );
final SingleFieldConstraint sfc0 = (SingleFieldConstraint) fcfp.getFactPattern().getConstraint( 0 );
assertNull( sfc0.getFactType() );
assertNull( sfc0.getFieldName() );
assertEquals( "size == c.items.size",
sfc0.getValue() );
assertEquals( BaseSingleFieldConstraint.TYPE_PREDICATE,
sfc0.getConstraintValueType() );
assertNotNull( fcfp.getRightPattern() );
assertTrue( fcfp.getRightPattern() instanceof FactPattern );
final FactPattern rfp = (FactPattern) fcfp.getRightPattern();
assertEquals( "Item",
rfp.getFactType() );
assertEquals( "var",
rfp.getBoundName() );
assertEquals( 1,
rfp.getNumberOfConstraints() );
assertTrue( rfp.getConstraint( 0 ) instanceof SingleFieldConstraint );
final SingleFieldConstraint sfc1 = (SingleFieldConstraint) rfp.getConstraint( 0 );
assertEquals( "Item",
sfc1.getFactType() );
assertEquals( "price",
sfc1.getFieldName() );
assertEquals( "10",
sfc1.getValue() );
assertEquals( ">",
sfc1.getOperator() );
assertEquals( BaseSingleFieldConstraint.TYPE_LITERAL,
sfc1.getConstraintValueType() );
assertEqualsIgnoreWhitespace( drl,
RuleModelDRLPersistenceImpl.getInstance().marshal( m ) );
}