Examples of Cheese


Examples of org.drools.Cheese

                                 list );

        workingMemory.setGlobal( "string",
                                 "stilton" );

        final Cheese stilton = new Cheese( "stilton",
                                           5 );
        workingMemory.insert( stilton );

        workingMemory.fireAllRules();
View Full Code Here

Examples of org.drools.Cheese

        workingMemory.setGlobal( "cheeseTypes",
                                 cheeseTypes );
        cheeseTypes.add( "stilton" );
        cheeseTypes.add( "muzzarela" );

        final Cheese stilton = new Cheese( "stilton",
                                           5 );
        workingMemory.insert( stilton );

        workingMemory.fireAllRules();

        assertEquals( 1,
                      results.size() );
        assertEquals( "memberOf",
                      results.get( 0 ) );

        final Cheese brie = new Cheese( "brie",
                                        5 );
        workingMemory.insert( brie );

        workingMemory.fireAllRules();
View Full Code Here

Examples of org.drools.Cheese

                         value );
            }

        } );

        Cheese bree = new Cheese();
        bree.setPrice( 100 );

        workingMemory.insert( bree );

        workingMemory.fireAllRules();
View Full Code Here

Examples of org.drools.Cheese

        };

        workingMemory.addEventListener( listener );

        final Person bigCheese = new Person( "big cheese" );
        final Cheese cheddar = new Cheese( "cheddar",
                                           15 );
        bigCheese.setCheese( cheddar );

        final FactHandle bigCheeseHandle = workingMemory.insert( bigCheese );
        final FactHandle cheddarHandle = workingMemory.insert( cheddar );
View Full Code Here

Examples of org.drools.Cheese

        final WorkingMemory workingMemory = ruleBase.newStatefulSession();

        final List list = new ArrayList();
        workingMemory.setGlobal( "list",
                                 list );
        final Cheese nullCheese = new Cheese( null,
                                              2 );
        workingMemory.insert( nullCheese );

        final Person notNullPerson = new Person( "shoes butt back" );
        notNullPerson.setBigDecimal( new BigDecimal( "42.42" ) );
View Full Code Here

Examples of org.drools.Cheese

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

        final Cheese stilton = new Cheese( "stilton",
                                           5 );
        workingMemory.insert( stilton );

        workingMemory.fireAllRules();
View Full Code Here

Examples of org.drools.Cheese

        workingMemory.fireAllRules();
        assertEquals( 0,
                      list.size() );

        workingMemory.insert( new Cheese( "brie",
                                          33 ) );

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

Examples of org.drools.Cheese

        final Reader reader = new InputStreamReader( getClass().getResourceAsStream( "MVEL_soundex.drl" ) );
        final RuleBase ruleBase = loadRuleBase( reader );

        final WorkingMemory workingMemory = ruleBase.newStatefulSession();

        Cheese c = new Cheese( "fubar",
                               2 );

        workingMemory.insert( c );
        workingMemory.fireAllRules();
        assertEquals( 42,
                      c.getPrice() );
    }
View Full Code Here

Examples of org.drools.Cheese

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

        final Cheese stilton = new Cheese( "stilton",
                                           5 );
        workingMemory.insert( stilton );

        workingMemory.fireAllRules();
View Full Code Here

Examples of org.drools.Cheese

        assertEquals( 1,
                      list.size() );

        Person p = new Person( "diablo",
                               new Cheese( "cheddar" ) );

        assertEquals( p,
                      list.get( 0 ) );
    }
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.