use of org.drools.core.common.PriorityQueueAgendaGroupFactory in project drools by kiegroup.
the class RuleBaseConfigurationTest method testSequential.
@Test
public void testSequential() {
Properties properties = new Properties();
properties.setProperty("drools.sequential", "false");
RuleBaseConfiguration cfg = new RuleBaseConfiguration(properties);
assertFalse(cfg.isSequential());
assertTrue(cfg.getAgendaGroupFactory() instanceof PriorityQueueAgendaGroupFactory);
properties = new Properties();
properties.setProperty("drools.sequential.agenda", "sequential");
properties.setProperty("drools.sequential", "true");
cfg = new RuleBaseConfiguration(properties);
assertTrue(cfg.isSequential());
assertEquals(SequentialAgenda.SEQUENTIAL, cfg.getSequentialAgenda());
properties = new Properties();
properties.setProperty("drools.sequential.agenda", "dynamic");
properties.setProperty("drools.sequential", "true");
cfg = new RuleBaseConfiguration(properties);
assertTrue(cfg.isSequential());
assertEquals(SequentialAgenda.DYNAMIC, cfg.getSequentialAgenda());
assertTrue(cfg.getAgendaGroupFactory() instanceof PriorityQueueAgendaGroupFactory);
}
Aggregations