-
-
Save baldimir/94ef23595574d7cdcbb500d0e97059ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testDroolsContext() { | |
String str = | |
"global java.util.List list\n" + | |
"\n" + | |
"rule R when\n" + | |
"then\n" + | |
" list.add(kcontext);\n" + | |
"end"; | |
KieSession ksession = getKieSession(str); | |
List<Object> list = new ArrayList<>(); | |
ksession.setGlobal("list", list); | |
ksession.fireAllRules(); | |
assertEquals( 1, list.size() ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment