Package org.drools.integrationtests.helloworld

Examples of org.drools.integrationtests.helloworld.Message


        final WorkingMemory workingMemory = ruleBase.newStatefulSession();
        final List list = new ArrayList();
        workingMemory.setGlobal( "list",
                                 list );
        workingMemory.insert( new Message( "hola" ) );

        workingMemory.fireAllRules();
        assertEquals( 0,
                      list.size() );
View Full Code Here


        final List list = new ArrayList();
        workingMemory.setGlobal( "list",
                                 list );

        // go !
        final Message message = new Message( "hola" );
        message.addToList( "hello" );
        message.setNumber( 42 );

        workingMemory.insert( message );
        workingMemory.insert( "boo" );
        workingMemory.fireAllRules();
        assertTrue( message.isFired() );
        assertEquals( message,
                      list.get( 0 ) );

    }
View Full Code Here

        final List list = new ArrayList();
        workingMemory.setGlobal( "list",
                                 list );

        // go !
        final Message message = new Message( "hola" );
        workingMemory.insert( message );
        workingMemory.fireAllRules();
        assertFalse( message.isFired() );

    }   
View Full Code Here

        final WorkingMemory workingMemory = ruleBase.newStatefulSession();
        final List list = new ArrayList();
        workingMemory.setGlobal( "list",
                                 list );
        workingMemory.insert( new Message( "hola" ) );

        workingMemory.fireAllRules();
        assertEquals( 0,
                      list.size() );
View Full Code Here

        final List list = new ArrayList();
        workingMemory.setGlobal( "list",
                                 list );

        // go !
        final Message message = new Message( "hola" );
        message.addToList( "hello" );
        message.setNumber( 42 );

        workingMemory.insert( message );
        workingMemory.insert( "boo" );
        workingMemory.fireAllRules();
        assertTrue( message.isFired() );
        assertEquals( message,
                      list.get( 0 ) );

    }
View Full Code Here

        final List list = new ArrayList();
        workingMemory.setGlobal( "list",
                                 list );

        // go !
        final Message message = new Message( "hola" );
        workingMemory.insert( message );
        workingMemory.fireAllRules();
        assertFalse( message.isFired() );

    }   
View Full Code Here

TOP

Related Classes of org.drools.integrationtests.helloworld.Message

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.