Examples of ActionCallMethod


Examples of org.drools.workbench.models.datamodel.rule.ActionCallMethod

        assertEquals( 2, m.rhs.length );
        assertTrue( m.rhs[ 0 ] instanceof ActionCallMethod );
        assertTrue( m.rhs[ 1 ] instanceof ActionCallMethod );

        ActionCallMethod actionCallMethod1 = (ActionCallMethod) m.rhs[ 0 ];
        assertEquals( 1, actionCallMethod1.getState() );
        assertEquals( "indexOf", actionCallMethod1.getMethodName() );
        assertEquals( "s", actionCallMethod1.getVariable() );
        assertEquals( 1, actionCallMethod1.getFieldValues().length );
        assertEquals( "indexOf", actionCallMethod1.getFieldValues()[ 0 ].getField() );
        assertEquals( "s", actionCallMethod1.getFieldValues()[ 0 ].getValue() );
        assertEquals( FieldNatureType.TYPE_VARIABLE, actionCallMethod1.getFieldValues()[ 0 ].getNature() );
        assertEquals( "String", actionCallMethod1.getFieldValues()[ 0 ].getType() );

        ActionCallMethod actionCallMethod2 = (ActionCallMethod) m.rhs[ 1 ];
        assertEquals( 1, actionCallMethod2.getState() );
        assertEquals( "indexOf", actionCallMethod2.getMethodName() );
        assertEquals( "s", actionCallMethod2.getVariable() );
        assertEquals( 1, actionCallMethod2.getFieldValues().length );
        assertEquals( "indexOf", actionCallMethod2.getFieldValues()[ 0 ].getField() );
        assertEquals( "0", actionCallMethod2.getFieldValues()[ 0 ].getValue() );
        assertEquals( FieldNatureType.TYPE_LITERAL, actionCallMethod2.getFieldValues()[ 0 ].getNature() );
        assertEquals( "Numeric", actionCallMethod2.getFieldValues()[ 0 ].getType() );

    }
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.