Package org.drools.core.common

Examples of org.drools.core.common.InternalAgenda.agendaSize()


                     activationGroup0.size());

        // Fire  the  last activation and  make sure the Agenda Empties
        agenda.fireNextItem(null, 0, -1);
        assertEquals(0,
                     agenda.agendaSize());

        assertEquals(2,
                     list.size());
        assertEquals(rule1,
                     list.get(0));
View Full Code Here


        assertEquals(1,
                     ruleFlowGroup1.size());
        assertEquals(1,
                     ruleFlowGroup2.size());
        assertEquals(4,
                     agenda.agendaSize());

        // Activate the RuleFlowGroup, the nodes stay in the group, but should now also be in the Agenda
        agenda.activateRuleFlowGroup("rule-flow-group-0");
        assertEquals(2,
                     ruleFlowGroup0.size());
View Full Code Here

        // Activate the RuleFlowGroup, the nodes stay in the group, but should now also be in the Agenda
        agenda.activateRuleFlowGroup("rule-flow-group-0");
        assertEquals(2,
                     ruleFlowGroup0.size());
        assertEquals(4,
                     agenda.agendaSize());

        // As we fire each rule they are removed from both the Agenda and the RuleFlowGroup
        agenda.fireNextItem(null, 0, -1);
        assertEquals(1,
                     ruleFlowGroup0.size());
View Full Code Here

        // As we fire each rule they are removed from both the Agenda and the RuleFlowGroup
        agenda.fireNextItem(null, 0, -1);
        assertEquals(1,
                     ruleFlowGroup0.size());
        assertEquals(3,
                     agenda.agendaSize());

        // After firing all activations of RuleFlowGroup 0, the agenda is empty
        agenda.fireNextItem(null, 0, -1);
        assertEquals(0,
                     ruleFlowGroup0.size());
View Full Code Here

        // After firing all activations of RuleFlowGroup 0, the agenda is empty
        agenda.fireNextItem(null, 0, -1);
        assertEquals(0,
                     ruleFlowGroup0.size());
        assertEquals(2,
                     agenda.agendaSize());

        // Now we activate two RuleFlowGroups together
        // All their activations should be added to the agenda.
        agenda.activateRuleFlowGroup("rule-flow-group-1");
        agenda.activateRuleFlowGroup("rule-flow-group-2");
View Full Code Here

        assertEquals(1,
                     ruleFlowGroup1.size());
        assertEquals(1,
                     ruleFlowGroup2.size());
        assertEquals(2,
                     agenda.agendaSize());

        // we set the salience higher on rule2, so it sould fire first and empty ruleFlowGroup2
        agenda.fireNextItem(null, 0, -1);
        assertEquals(1,
                     ruleFlowGroup1.size());
View Full Code Here

        assertEquals(1,
                     ruleFlowGroup1.size());
        assertEquals(0,
                     ruleFlowGroup2.size());
        assertEquals(1,
                     agenda.agendaSize());

        // this is the last activation, so everything should be empty after this
        agenda.fireNextItem(null, 0, -1);
        assertEquals(0,
                     ruleFlowGroup0.size());
View Full Code Here

        assertEquals(0,
                     ruleFlowGroup1.size());
        assertEquals(0,
                     ruleFlowGroup2.size());
        assertEquals(0,
                     agenda.agendaSize());
    }

    /**
     * RuleFlowGroup test that makes sure that, if new activations are created
     * for an active RuleFlowGroup, those activations get added to the agenda
View Full Code Here

        // After firing all activations of RuleFlowGroup 0, the agenda is empty
        agenda.fireNextItem(null, 0, -1);
        assertEquals(0,
                     ruleFlowGroup0.size());
        assertEquals(0,
                     agenda.agendaSize());
    }

    /**
     * RuleFlowGroup test that makes sure that, if an activation in an active
     * RuleFlowGroup gets deactivated, the activation is no longer executed.
View Full Code Here

        // RuleFlowGroup should be empty, as well as the agenda
        assertEquals(0,
                     ruleFlowGroup0.size());
        assertEquals(0,
                     agenda.agendaSize());

        // @TODO FIXME (mdp)
        //        // Activate the RuleFlowGroup, the activations stay in the group, but
        //        // should now also be in the Agenda
        //        agenda.activateRuleFlowGroup( "rule-flow-group-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.