use of org.pentaho.platform.api.scheduler2.ISchedulerListener in project pentaho-platform by pentaho.
the class QuartzSchedulerIT method fireJobCompletedTest.
@Test
public void fireJobCompletedTest() throws Exception {
final IAction actionBean = mock(IAction.class);
final String actionUser = "actionUser";
final ISchedulerListener schedulerListener = mock(ISchedulerListener.class);
scheduler.addListener(schedulerListener);
final Map<String, Serializable> params = new HashMap<>();
final IBackgroundExecutionStreamProvider streamProvider = mock(IBackgroundExecutionStreamProvider.class);
scheduler.fireJobCompleted(actionBean, actionUser, params, streamProvider);
verify(schedulerListener, times(1)).jobCompleted(eq(actionBean), eq(actionUser), eq(params), eq(streamProvider));
}
Aggregations