use of org.drools.core.command.impl.ContextImpl in project drools by kiegroup.
the class SetDMNActiveModelCommandTest method init.
@Before
public void init() {
registryContext = new ContextImpl();
dmnRuntime = kieContainer.newKieSession().getKieRuntime(DMNRuntime.class);
}
use of org.drools.core.command.impl.ContextImpl in project drools by kiegroup.
the class GetDMNDecisionResultsCommandTest method execute.
@Test
public void execute() {
RegistryContext registryContext = new ContextImpl();
GetDMNDecisionResultsCommand getDMNDecisionResultsCommand = new GetDMNDecisionResultsCommand();
assertThatThrownBy(() -> getDMNDecisionResultsCommand.execute(registryContext)).isInstanceOf(IllegalStateException.class).hasMessage("There is no DMNResult available");
DMNResultImpl dmnResult = new DMNResultImpl(null);
dmnResult.setContext(new DMNContextImpl());
registryContext.register(DMNResult.class, dmnResult);
List<DMNDecisionResult> result = getDMNDecisionResultsCommand.execute(registryContext);
assertEquals(0, result.size());
}
Aggregations