@Test public void testOnRuleFlowGroupDataChanged() { RuleFlowGroup group1 = new RuleFlowGroup("g1"); RuleFlowGroup group2 = new RuleFlowGroup("g2"); RuleFlowGroupDataEvent event = mock(RuleFlowGroupDataEvent.class); when(event.getGroups()).thenReturn(new RuleFlowGroup[]{group1, group2}); tested.onRuleFlowGroupDataChanged(event); verify(formsHandler, times(1)).refreshCurrentSessionForms(eq(BPMNDefinitionSet.class)); List<RuleFlowGroup> values = tested.getRuleFlowGroupNames(); assertNotNull(values); assertEquals(2, values.size()); assertEquals("g1", values.get(0).getName()); assertEquals("g2", values.get(1).getName()); }
void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); }
RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } }
RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } RuleFlowGroupDataProvider(); @Inject  RuleFlowGroupDataProvider(final StunnerFormsHandler formsHandler); }
RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } RuleFlowGroupDataProvider(); @Inject  RuleFlowGroupDataProvider(final StunnerFormsHandler formsHandler); List<RuleFlowGroup> getRuleFlowGroupNames(); }
RuleFlowGroupDataProvider { void onRuleFlowGroupDataChanged(final @Observes RuleFlowGroupDataEvent event) { setRuleFlowGroupNames(toList(event.getGroups())); } RuleFlowGroupDataProvider(); @Inject  RuleFlowGroupDataProvider(final StunnerFormsHandler formsHandler); List<RuleFlowGroup> getRuleFlowGroupNames();  }