/** Test that condition does not trigger after removing right. */ public void testRightRemoveNoTrigger() { // Modify bean to cause activation. bean2.setName("A"); state.removeJavaRootObject(bean2); system.fireAllRules(); List test = Collections.EMPTY_LIST; assertEquals("Condition should not trigger after right remove", test, triggered); }
public void run() { try { Thread.sleep(2000); } catch (InterruptedException e) { } TestBean2 out = new TestBean2(); out.setFirst(bean1.getFirst()); out.setSecond(bean1.getSecond()); out.setThird(bean1.getThird()); out.setFourth(bean1.getFourth()); out.setFifth(bean1.getFifth()); out.setSixth(bean1.getSixth()); out.setSeventh(bean1.getSeventh()); out.setEight(bean1.getEight()); out.setNinth(bean1.getNinth()); response.setData(out); response.completed(); }
/** Test that condition does not trigger when modifying right. */ public void testRightModifyNoTrigger() { bean2.setName("C"); system.fireAllRules(); List test = Collections.EMPTY_LIST; assertEquals("Condition should not trigger on right modify", test, triggered); }
/** Test that condition triggers when modifying right. */ public void testRightModifyTrigger() { bean2.setName("A"); system.fireAllRules(); List test = Collections.singletonList("A"); assertEquals("Condition should trigger on right modify", test, triggered); }