org.drools.testframework
Class RuleCoverageListener
java.lang.Object
org.drools.testframework.RuleCoverageListener
- All Implemented Interfaces:
- EventListener, AgendaEventListener
public class RuleCoverageListener
- extends Object
- implements AgendaEventListener
Measure the rule coverage.
Method Summary |
void |
activationCancelled(ActivationCancelledEvent event,
WorkingMemory workingMemory)
|
void |
activationCreated(ActivationCreatedEvent event,
WorkingMemory workingMemory)
|
void |
afterActivationFired(AfterActivationFiredEvent event,
WorkingMemory workingMemory)
|
void |
afterRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event,
WorkingMemory workingMemory)
|
void |
afterRuleFlowGroupDeactivated(RuleFlowGroupDeactivatedEvent event,
WorkingMemory workingMemory)
|
void |
agendaGroupPopped(AgendaGroupPoppedEvent event,
WorkingMemory workingMemory)
|
void |
agendaGroupPushed(AgendaGroupPushedEvent event,
WorkingMemory workingMemory)
|
void |
beforeActivationFired(BeforeActivationFiredEvent event,
WorkingMemory workingMemory)
|
void |
beforeRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event,
WorkingMemory workingMemory)
|
void |
beforeRuleFlowGroupDeactivated(RuleFlowGroupDeactivatedEvent event,
WorkingMemory workingMemory)
|
int |
getPercentCovered()
|
String[] |
getUnfiredRules()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RuleCoverageListener
public RuleCoverageListener(HashSet<String> expectedRuleNames)
- Pass in the expected rules to fire.
- Parameters:
expectedRuleNames
-
activationCancelled
public void activationCancelled(ActivationCancelledEvent event,
WorkingMemory workingMemory)
- Specified by:
activationCancelled
in interface AgendaEventListener
activationCreated
public void activationCreated(ActivationCreatedEvent event,
WorkingMemory workingMemory)
- Specified by:
activationCreated
in interface AgendaEventListener
afterActivationFired
public void afterActivationFired(AfterActivationFiredEvent event,
WorkingMemory workingMemory)
- Specified by:
afterActivationFired
in interface AgendaEventListener
agendaGroupPopped
public void agendaGroupPopped(AgendaGroupPoppedEvent event,
WorkingMemory workingMemory)
- Specified by:
agendaGroupPopped
in interface AgendaEventListener
agendaGroupPushed
public void agendaGroupPushed(AgendaGroupPushedEvent event,
WorkingMemory workingMemory)
- Specified by:
agendaGroupPushed
in interface AgendaEventListener
beforeActivationFired
public void beforeActivationFired(BeforeActivationFiredEvent event,
WorkingMemory workingMemory)
- Specified by:
beforeActivationFired
in interface AgendaEventListener
getUnfiredRules
public String[] getUnfiredRules()
- Returns:
- A set of rules that were not fired.
getPercentCovered
public int getPercentCovered()
afterRuleFlowGroupActivated
public void afterRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event,
WorkingMemory workingMemory)
- Specified by:
afterRuleFlowGroupActivated
in interface AgendaEventListener
afterRuleFlowGroupDeactivated
public void afterRuleFlowGroupDeactivated(RuleFlowGroupDeactivatedEvent event,
WorkingMemory workingMemory)
- Specified by:
afterRuleFlowGroupDeactivated
in interface AgendaEventListener
beforeRuleFlowGroupActivated
public void beforeRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event,
WorkingMemory workingMemory)
- Specified by:
beforeRuleFlowGroupActivated
in interface AgendaEventListener
beforeRuleFlowGroupDeactivated
public void beforeRuleFlowGroupDeactivated(RuleFlowGroupDeactivatedEvent event,
WorkingMemory workingMemory)
- Specified by:
beforeRuleFlowGroupDeactivated
in interface AgendaEventListener
Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.