Class RuleCoverageListener
java.lang.Object
org.drools.compiler.testframework.RuleCoverageListener
- All Implemented Interfaces:
EventListener,AgendaEventListener
Measure the rule coverage.
-
Constructor Summary
ConstructorsConstructorDescriptionRuleCoverageListener(HashSet<String> expectedRuleNames) Pass in the expected rules to fire. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoidintgetRules()String[]voidvoidmatchCreated(MatchCreatedEvent event)
-
Constructor Details
-
RuleCoverageListener
Pass in the expected rules to fire.- Parameters:
expectedRuleNames-
-
-
Method Details
-
matchCancelled
- Specified by:
matchCancelledin interfaceAgendaEventListener
-
matchCreated
- Specified by:
matchCreatedin interfaceAgendaEventListener
-
afterMatchFired
- Specified by:
afterMatchFiredin interfaceAgendaEventListener
-
agendaGroupPopped
- Specified by:
agendaGroupPoppedin interfaceAgendaEventListener
-
agendaGroupPushed
- Specified by:
agendaGroupPushedin interfaceAgendaEventListener
-
beforeMatchFired
- Specified by:
beforeMatchFiredin interfaceAgendaEventListener
-
getRules
-
getUnfiredRules
- Returns:
- A set of rules that were not fired.
-
getPercentCovered
public int getPercentCovered() -
afterRuleFlowGroupActivated
- Specified by:
afterRuleFlowGroupActivatedin interfaceAgendaEventListener
-
afterRuleFlowGroupDeactivated
- Specified by:
afterRuleFlowGroupDeactivatedin interfaceAgendaEventListener
-
beforeRuleFlowGroupActivated
- Specified by:
beforeRuleFlowGroupActivatedin interfaceAgendaEventListener
-
beforeRuleFlowGroupDeactivated
- Specified by:
beforeRuleFlowGroupDeactivatedin interfaceAgendaEventListener
-