Package org.drools.guvnor.models.testscenarios.shared

Examples of org.drools.guvnor.models.testscenarios.shared.CallMethod


        Cheesery listChesse = new Cheesery();
        listChesse.setTotalAmount( 1000 );
        populatedData.put( "cheese",
                           listChesse );
        CallMethod mCall = new CallMethod();
        mCall.setVariable( "cheese" );
        mCall.setMethodName( "setTotalAmountToZero" );

        methodExecutor.executeMethod( mCall );

        assertTrue( listChesse.getTotalAmount() == 0 );
    }
View Full Code Here


        Cheesery listChesse = new Cheesery();
        listChesse.setTotalAmount( 1000 );
        populatedData.put( "cheese",
                           listChesse );
        CallMethod mCall = new CallMethod();
        mCall.setVariable( "cheese" );
        mCall.setMethodName( "setTotalAmount" );
        CallFieldValue field = new CallFieldValue();
        field.value = "1005";
        mCall.addFieldValue( field );

        methodExecutor.executeMethod( mCall );
        assertTrue( listChesse.getTotalAmount() == 1005 );
    }
View Full Code Here

        populatedData.put( "cheese",
                           listChesse );
        Cheesery.Maturity m = Cheesery.Maturity.OLD;
        populatedData.put( "m",
                           m );
        CallMethod mCall = new CallMethod();
        mCall.setVariable( "cheese" );
        mCall.setMethodName( "setMaturity" );
        CallFieldValue field = new CallFieldValue();
        field.value = "=m";
        mCall.addFieldValue( field );

        methodExecutor.executeMethod( mCall );

        assertTrue( listChesse.getMaturity().equals( m ) );
        assertTrue( listChesse.getMaturity() == m );
View Full Code Here

        populatedData.put( "cheese",
                           listCheese );
        Cheesery.Maturity m = Cheesery.Maturity.YOUNG;
        populatedData.put( "m",
                           m );
        CallMethod mCall = new CallMethod();
        mCall.setVariable( "cheese" );
        mCall.setMethodName( "setMaturityAndStatus" );
        CallFieldValue field = new CallFieldValue();
        field.value = "=m";
        mCall.addFieldValue( field );
        CallFieldValue field2 = new CallFieldValue();
        field2.value = "1";
        mCall.addFieldValue( field2 );

        methodExecutor.executeMethod( mCall );
        assertEquals( m, listCheese.getMaturity() );
        assertEquals( 1, listCheese.getStatus() );
    }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.models.testscenarios.shared.CallMethod

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.