190191192193194195196197198199200
rulesFired = ksession.fireAllRules(); System.out.println( rulesFired ); assertEquals( 1, rulesFired ); ksession.dispose(); } @Test public void testNPEOnMutableGlobal() throws Exception { // BZ-1019473
41864187418841894190419141924193419441954196
ksession.insert( "go" ); ksession.fireAllRules(); assertTrue( list.isEmpty() ); ksession.dispose(); } @Test public void testInitialFactLeaking() { // DROOLS-239
481482483484485486487488489490491
((InternalAgenda)ksession.getAgenda()).activateRuleFlowGroup("test"); ksession.fireAllRules(); assertEquals(1, res.size()); ksession.delete(fact3); ksession.dispose(); } @Test public void testBooleanPropertyStartingWithEmpty() {
542543544545546547548549550551552
Person p = new Person("Mario", 38); p.setBigDecimal(new BigDecimal("0")); ksession.insert(p); assertEquals(1, ksession.fireAllRules()); ksession.dispose(); } @Test(timeout = 5000) public void testInfiniteLoopCausedByInheritance() throws Exception { // DROOLS-13
42174218421942204221422242234224422542264227
ksession.insert(1); ksession.fireAllRules(); assertEquals(2, list.size()); ksession.dispose(); } @Test public void testNoLoopWithNamedConsequences() { // DROOLS-327
47554756475747584759476047614762476347644765
ksession.setGlobal("list", list); ksession.fireAllRules(); assertEquals(1, list.size()); assertEquals("working", list.get(0)); ksession.dispose(); ksession = kbase.newStatefulKnowledgeSession(); list.clear(); ksession.setGlobal("list", list);
47654766476747684769477047714772477347744775
ksession.setGlobal("list", list); ksession.fireAllRules(); assertEquals(1, list.size()); assertEquals("working", list.get(0)); ksession.dispose(); } @Test public void testWildcardImportForTypeField() throws Exception { // DROOLS-348
76407641764276437644764576467647764876497650
int rulesFired = knowledgeSession.fireAllRules(); assertEquals( 1, rulesFired ); knowledgeSession.dispose(); } @Test public void testGUVNOR578_2() throws Exception { MapBackedClassLoader loader = new MapBackedClassLoader( this.getClass().getClassLoader() );
77637764776577667767776877697770777177727773
org.kie.api.runtime.rule.FactHandle fooFactHandle = ksession.getFactHandle( tehFoo ); tehFoo.setBar( barList[magicBars[i]] ); ksession.update( fooFactHandle, tehFoo ); ksession.fireAllRules(); } ksession.dispose(); } @Test public void testJBRULES3326() throws Exception { StringBuilder rule = new StringBuilder();
77837784778577867787778877897790779177927793
StatefulKnowledgeSession ksession = createKnowledgeSession( kbase ); ksession.insert( new Message( "test" ) ); int rules = ksession.fireAllRules(); assertEquals( 1, rules ); ksession.dispose(); } @Test public void testDispose() throws Exception { StringBuilder rule = new StringBuilder();