Examples of RestrictionConnectiveDescr


Examples of org.drools.lang.descr.RestrictionConnectiveDescr

                      pattern.getDescrs().size() );
        FieldConstraintDescr fcd = (FieldConstraintDescr) pattern.getDescrs().get( 0 );
        assertEquals( "name",
                      fcd.getFieldName() );

        RestrictionConnectiveDescr or = (RestrictionConnectiveDescr) fcd.getRestrictions().get( 0 );

        assertEquals( 2,
                      or.getRestrictions().size() );

        assertEquals( "matches",
                      ((LiteralRestrictionDescr) or.getRestrictions().get( 0 )).getEvaluator() );
        assertEquals( "mark",
                      ((LiteralRestrictionDescr) or.getRestrictions().get( 0 )).getText() );

        assertEquals( "matches",
                      ((LiteralRestrictionDescr) or.getRestrictions().get( 1 )).getEvaluator() );
        assertEquals( "bob",
                      ((LiteralRestrictionDescr) or.getRestrictions().get( 1 )).getText() );

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.