Search in sources :

Example 1 with ISchedulerListener

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));
}
Also used : IBackgroundExecutionStreamProvider(org.pentaho.platform.api.scheduler2.IBackgroundExecutionStreamProvider) Serializable(java.io.Serializable) IAction(org.pentaho.platform.api.action.IAction) HashMap(java.util.HashMap) ISchedulerListener(org.pentaho.platform.api.scheduler2.ISchedulerListener) Test(org.junit.Test)

Aggregations

Serializable (java.io.Serializable)1 HashMap (java.util.HashMap)1 Test (org.junit.Test)1 IAction (org.pentaho.platform.api.action.IAction)1 IBackgroundExecutionStreamProvider (org.pentaho.platform.api.scheduler2.IBackgroundExecutionStreamProvider)1 ISchedulerListener (org.pentaho.platform.api.scheduler2.ISchedulerListener)1