Search in sources :

Example 1 with CommonTestMethodBase

use of org.drools.compiler.CommonTestMethodBase in project drools by kiegroup.

the class DynamicRulesChangesTest method addRule.

public static void addRule(String ruleName, RuleImpl firingRule) throws Exception {
    String rule = rules.get(ruleName);
    CommonTestMethodBase testBaseMethod = new CommonTestMethodBase();
    kbase.addPackages(testBaseMethod.loadKnowledgePackagesFromString(rule));
    if (firingRule != null) {
        kbase.removeRule("defaultpkg", firingRule.getName());
    }
}
Also used : CommonTestMethodBase(org.drools.compiler.CommonTestMethodBase)

Aggregations

CommonTestMethodBase (org.drools.compiler.CommonTestMethodBase)1