public void testAddListenerButNoMatch() { FlowExecutionListener listener = new FlowExecutionListener() {}; loader.addListener(listener, criteriaFactory.flow("bar")); Flow flow = new Flow("foo"); FlowExecutionListener[] listeners = loader.getListeners(flow); assertEquals(0, listeners.length); } }
public void testFlowMatch() { FlowExecutionListenerCriteria c = factory.flow("foo"); assertEquals(true, c.appliesTo(new Flow("foo"))); assertEquals(false, c.appliesTo(new Flow("baz"))); }