Examples of agendaSize()


Examples of org.drools.common.DefaultAgenda.agendaSize()

        assertEquals( agenda.getFocus(),
                      main );
        assertEquals( 0,
                      agenda.getFocus().size() );
        assertEquals( 0,
                      agenda.agendaSize() );

    }

    //
    @Test
View Full Code Here

Examples of org.drools.common.DefaultAgenda.agendaSize()

        // make sure the activation-group-3 is cleared when we can clear the Agenda Group for the activation that is in both
        final ActivationGroup activationGroup3 = agenda.getActivationGroup( "activation-group-3" );

        assertEquals( 4,
                      agenda.agendaSize() );
        assertEquals( 1,
                      activationGroup3.size() );

        agenda.clearAndCancelAgendaGroup( "agendaGroup3" );
        assertEquals( 3,
View Full Code Here

Examples of org.drools.common.DefaultAgenda.agendaSize()

        assertEquals( 1,
                      activationGroup3.size() );

        agenda.clearAndCancelAgendaGroup( "agendaGroup3" );
        assertEquals( 3,
                      agenda.agendaSize() );
        assertEquals( 0,
                      activationGroup3.size() );

        // Activation for activation-group-0 should be next - the activation in no activation/agenda group should remain on the agenda
        agenda.fireNextItem( null );
View Full Code Here

Examples of org.drools.common.DefaultAgenda.agendaSize()

                      activationGroup3.size() );

        // Activation for activation-group-0 should be next - the activation in no activation/agenda group should remain on the agenda
        agenda.fireNextItem( null );
        assertEquals( 1,
                      agenda.agendaSize() );
        assertEquals( 0,
                      activationGroup0.size() );

        // Fire  the  last activation and  make sure the Agenda Empties
        agenda.fireNextItem( null );
View Full Code Here

Examples of org.drools.common.DefaultAgenda.agendaSize()

                      activationGroup0.size() );

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

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

Examples of org.drools.common.DefaultAgenda.agendaSize()

        assertEquals( 1,
                      ruleFlowGroup1.size() );
        assertEquals( 1,
                      ruleFlowGroup2.size() );
        assertEquals( 0,
                      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

Examples of org.drools.common.DefaultAgenda.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() );
        assertEquals( 2,
                      agenda.agendaSize() );

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

Examples of org.drools.common.DefaultAgenda.agendaSize()

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

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

Examples of org.drools.common.DefaultAgenda.agendaSize()

        // After firing all activations of RuleFlowGroup 0, the agenda is empty
        agenda.fireNextItem( null );
        assertEquals( 0,
                      ruleFlowGroup0.size() );
        assertEquals( 0,
                      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

Examples of org.drools.common.DefaultAgenda.agendaSize()

        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 );
        assertEquals( 1,
                      ruleFlowGroup1.size() );
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.