Package org.drools.ide.common.client.modeldriven.testing

Examples of org.drools.ide.common.client.modeldriven.testing.CallFieldValue


        runner.getPopulatedData().put( "cheese",
                                       listChesse );
        CallMethod mCall = new CallMethod();
        mCall.setVariable( "cheese" );
        mCall.setMethodName( "addToTotalAmount" );
        CallFieldValue field = new CallFieldValue();
        field.value = "5";
        mCall.addFieldValue( field );
        runner.executeMethodOnObject( mCall,
                                      listChesse );
        assertTrue( listChesse.getTotalAmount() == 1005 );
View Full Code Here


        runner.getPopulatedData().put( "m",
                                       m );
        CallMethod mCall = new CallMethod();
        mCall.setVariable( "cheese" );
        mCall.setMethodName( "setGoodMaturity" );
        CallFieldValue field = new CallFieldValue();
        field.value = "=m";
        mCall.addFieldValue( field );
        runner.executeMethodOnObject( mCall,
                                      listChesse );
        assertTrue( listChesse.getMaturity().equals( m ) );
View Full Code Here

        runner.getPopulatedData().put( "m",
                                       m );
        CallMethod mCall = new CallMethod();
        mCall.setVariable( "cheese" );
        mCall.setMethodName( "setAgeToMaturity" );
        CallFieldValue field = new CallFieldValue();
        field.value = "=m";
        mCall.addFieldValue( field );
        CallFieldValue field2 = new CallFieldValue();
        field2.value = "veryold";
        mCall.addFieldValue( field2 );
        runner.executeMethodOnObject( mCall,
                                      listChesse );
        assertTrue( m.getAge().equals( "veryold" ) );
View Full Code Here

        layout.setWidget( 0,
                          0,
                          getSetterLabel() );
        DirtyableFlexTable inner = new DirtyableFlexTable();
        for ( int i = 0; i < mCall.getCallFieldValues().length; i++ ) {
            CallFieldValue val = mCall.getCallFieldValues()[i];

            inner.setWidget( i,
                             0,
                             fieldSelector( val ) );
            inner.setWidget( i,
View Full Code Here

                // String fieldType = completions.getFieldType( variableClass,
                // fieldName );
                int i = 0;
                for ( String fieldParameter : fieldList ) {
                    mCall.addFieldValue( new CallFieldValue( methodName,
                                                             String.valueOf( i ),
                                                             fieldParameter ) );
                    i++;
                }
View Full Code Here

        layout.setWidget( 0,
                          0,
                          getSetterLabel() );
        DirtyableFlexTable inner = new DirtyableFlexTable();
        for ( int i = 0; i < mCall.getCallFieldValues().length; i++ ) {
            CallFieldValue val = mCall.getCallFieldValues()[i];

            inner.setWidget( i,
                             0,
                             fieldSelector( val ) );
            inner.setWidget( i,
View Full Code Here

                // String fieldType = completions.getFieldType( variableClass,
                // fieldName );
                int i = 0;
                for ( String fieldParameter : fieldList ) {
                    mCall.addFieldValue( new CallFieldValue( methodName,
                                                             String.valueOf( i ),
                                                             fieldParameter ) );
                    i++;
                }
View Full Code Here

        Map<String, Object> vars = new HashMap<String, Object>();
        vars.put( "__fact__",
                  factObject );
        String methodName = "__fact__." + fact.getMethodName() + "(";
        for ( int i = 0; i < fact.getCallFieldValues().length; i++ ) {
            CallFieldValue field = (CallFieldValue) fact.getCallFieldValues()[i];
            Object val;
            if ( field.value != null && !field.value.equals( "" ) ) {
                if ( field.value.startsWith( "=" ) ) {
                    // eval the val into existence
                    val = populatedData.get( field.value.substring( 1 ) );
View Full Code Here

        Map<String, Object> vars = new HashMap<String, Object>();
        vars.put( "__fact__",
                  factObject );
        String methodName = "__fact__." + fact.getMethodName() + "(";
        for ( int i = 0; i < fact.getCallFieldValues().length; i++ ) {
            CallFieldValue field = (CallFieldValue) fact.getCallFieldValues()[i];
            Object val;
            if ( field.value != null && !field.value.equals( "" ) ) {
                if ( field.value.startsWith( "=" ) ) {
                    // eval the val into existence
                    val = populatedData.get( field.value.substring( 1 ) );
View Full Code Here

        Map<String, Object> vars = new HashMap<String, Object>();
        vars.put("__fact__",
                factObject);
        String methodName = "__fact__." + fact.getMethodName() + "(";
        for (int i = 0; i < fact.getCallFieldValues().length; i++) {
            CallFieldValue field = (CallFieldValue) fact.getCallFieldValues()[i];
            Object val;
            if (field.value != null && !field.value.equals("")) {
                if (field.value.startsWith("=")) {
                    // eval the val into existence
                    val = populatedData.get(field.value.substring(1));
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.testing.CallFieldValue

Copyright © 2018 www.massapicom. 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.