Class RuleCoverageListener
- java.lang.Object
-
- org.drools.compiler.testframework.RuleCoverageListener
-
- All Implemented Interfaces:
java.util.EventListener
,org.kie.api.event.rule.AgendaEventListener
public class RuleCoverageListener extends java.lang.Object implements org.kie.api.event.rule.AgendaEventListener
Measure the rule coverage.
-
-
Constructor Summary
Constructors Constructor Description RuleCoverageListener(java.util.HashSet<java.lang.String> expectedRuleNames)
Pass in the expected rules to fire.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterMatchFired(org.kie.api.event.rule.AfterMatchFiredEvent event)
void
afterRuleFlowGroupActivated(org.kie.api.event.rule.RuleFlowGroupActivatedEvent event)
void
afterRuleFlowGroupDeactivated(org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent event)
void
agendaGroupPopped(org.kie.api.event.rule.AgendaGroupPoppedEvent event)
void
agendaGroupPushed(org.kie.api.event.rule.AgendaGroupPushedEvent event)
void
beforeMatchFired(org.kie.api.event.rule.BeforeMatchFiredEvent event)
void
beforeRuleFlowGroupActivated(org.kie.api.event.rule.RuleFlowGroupActivatedEvent event)
void
beforeRuleFlowGroupDeactivated(org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent event)
int
getPercentCovered()
java.util.Set<java.lang.String>
getRules()
java.lang.String[]
getUnfiredRules()
void
matchCancelled(org.kie.api.event.rule.MatchCancelledEvent event)
void
matchCreated(org.kie.api.event.rule.MatchCreatedEvent event)
-
-
-
Method Detail
-
matchCancelled
public void matchCancelled(org.kie.api.event.rule.MatchCancelledEvent event)
- Specified by:
matchCancelled
in interfaceorg.kie.api.event.rule.AgendaEventListener
-
matchCreated
public void matchCreated(org.kie.api.event.rule.MatchCreatedEvent event)
- Specified by:
matchCreated
in interfaceorg.kie.api.event.rule.AgendaEventListener
-
afterMatchFired
public void afterMatchFired(org.kie.api.event.rule.AfterMatchFiredEvent event)
- Specified by:
afterMatchFired
in interfaceorg.kie.api.event.rule.AgendaEventListener
-
agendaGroupPopped
public void agendaGroupPopped(org.kie.api.event.rule.AgendaGroupPoppedEvent event)
- Specified by:
agendaGroupPopped
in interfaceorg.kie.api.event.rule.AgendaEventListener
-
agendaGroupPushed
public void agendaGroupPushed(org.kie.api.event.rule.AgendaGroupPushedEvent event)
- Specified by:
agendaGroupPushed
in interfaceorg.kie.api.event.rule.AgendaEventListener
-
beforeMatchFired
public void beforeMatchFired(org.kie.api.event.rule.BeforeMatchFiredEvent event)
- Specified by:
beforeMatchFired
in interfaceorg.kie.api.event.rule.AgendaEventListener
-
getRules
public java.util.Set<java.lang.String> getRules()
-
getUnfiredRules
public java.lang.String[] getUnfiredRules()
- Returns:
- A set of rules that were not fired.
-
getPercentCovered
public int getPercentCovered()
-
afterRuleFlowGroupActivated
public void afterRuleFlowGroupActivated(org.kie.api.event.rule.RuleFlowGroupActivatedEvent event)
- Specified by:
afterRuleFlowGroupActivated
in interfaceorg.kie.api.event.rule.AgendaEventListener
-
afterRuleFlowGroupDeactivated
public void afterRuleFlowGroupDeactivated(org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent event)
- Specified by:
afterRuleFlowGroupDeactivated
in interfaceorg.kie.api.event.rule.AgendaEventListener
-
beforeRuleFlowGroupActivated
public void beforeRuleFlowGroupActivated(org.kie.api.event.rule.RuleFlowGroupActivatedEvent event)
- Specified by:
beforeRuleFlowGroupActivated
in interfaceorg.kie.api.event.rule.AgendaEventListener
-
beforeRuleFlowGroupDeactivated
public void beforeRuleFlowGroupDeactivated(org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent event)
- Specified by:
beforeRuleFlowGroupDeactivated
in interfaceorg.kie.api.event.rule.AgendaEventListener
-
-