Search in sources :

Example 6 with RulesEngineParameters

use of org.jeasy.rules.api.RulesEngineParameters in project easy-rules by j-easy.

the class RulePriorityThresholdTest method setup.

@Before
public void setup() throws Exception {
    super.setup();
    when(rule1.getPriority()).thenReturn(1);
    when(rule1.evaluate(facts)).thenReturn(true);
    RulesEngineParameters parameters = new RulesEngineParameters().priorityThreshold(1);
    rulesEngine = new DefaultRulesEngine(parameters);
}
Also used : RulesEngineParameters(org.jeasy.rules.api.RulesEngineParameters) Before(org.junit.Before)

Aggregations

RulesEngineParameters (org.jeasy.rules.api.RulesEngineParameters)6 Before (org.junit.Before)4 Facts (org.jeasy.rules.api.Facts)1 Rules (org.jeasy.rules.api.Rules)1 RulesEngine (org.jeasy.rules.api.RulesEngine)1 DefaultRulesEngine (org.jeasy.rules.core.DefaultRulesEngine)1 Test (org.junit.Test)1