Package org.drools.workbench.models.datamodel.rule

Examples of org.drools.workbench.models.datamodel.rule.CompositeFactPattern.addFactPattern()


    @Test
    public void testValidateCompositeFactPatternTrue() throws Exception {
        CompositeFactPattern not = new CompositeFactPattern();
        not.setType( "not" );
        not.addFactPattern( new FactPattern() );

        model.addLhsItem( not );

        assertTrue( validator.isValid() );
        assertTrue( validator.getErrors().isEmpty() );
View Full Code Here


        constraint.setOperator( "==" );
        pattern.addConstraint( constraint );

        CompositeFactPattern not = new CompositeFactPattern();
        not.setType( "not" );
        not.addFactPattern( pattern );

        model.lhs = new IPattern[]{ not };

        assertFalse( validator.isValid() );
        assertEquals( 1, validator.getErrors().size() );
View Full Code Here

        constraint.setOperator( "== null" );
        pattern.addConstraint( constraint );

        CompositeFactPattern not = new CompositeFactPattern();
        not.setType( "not" );
        not.addFactPattern( pattern );

        model.lhs = new IPattern[]{ not };

        assertTrue( validator.isValid() );
        assertTrue( validator.getErrors().isEmpty() );
View Full Code Here

        constraint.setOperator( "!= null" );
        pattern.addConstraint( constraint );

        CompositeFactPattern not = new CompositeFactPattern();
        not.setType( "not" );
        not.addFactPattern( pattern );

        model.lhs = new IPattern[]{ not };

        assertTrue( validator.isValid() );
        assertTrue( validator.getErrors().isEmpty() );
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.