use of org.kie.api.runtime.builder.ExecutableBuilder in project drools by kiegroup.
the class BatchRunFluentTest method testSetAndGetWithCommandRegisterWithoutEnds.
@Test
public void testSetAndGetWithCommandRegisterWithoutEnds() {
ExecutableBuilder f = ExecutableBuilder.create();
f.newApplicationContext("app1").getKieContainer(releaseId).newSession().set("s1").end().getKieContainer(releaseId).newSession().set("s2").get("s1", KieSessionFluent.class).insert("h1").fireAllRules().get("s2", KieSessionFluent.class).insert("h2").fireAllRules().get("s1", KieSessionFluent.class).getGlobal("outS").out("outS1").dispose().get("s2", KieSessionFluent.class).getGlobal("outS").out("outS2").dispose();
RequestContext requestContext = ExecutableRunner.create().execute(f.getExecutable());
// Check that nothing went to the 'out'
assertEquals("h1", requestContext.get("outS1"));
assertEquals("h2", requestContext.get("outS2"));
}
Aggregations