use of org.molgenis.jobs.model.ScheduledJob in project molgenis by molgenis.
the class JobSchedulerTest method scheduleInactive.
@Test
public void scheduleInactive() throws SchedulerException {
ScheduledJob scheduledJob = scheduledJobFactory.create();
scheduledJob.setId(id);
scheduledJob.set(ScheduledJobMetadata.CRON_EXPRESSION, " 0/20 * * * * ?");
scheduledJob.set(ScheduledJobMetadata.NAME, "name");
scheduledJob.set(ScheduledJobMetadata.ACTIVE, false);
scheduledJob.setType(scheduledJobType);
when(quartzScheduler.checkExists(jobKey)).thenReturn(false);
jobScheduler.schedule(scheduledJob);
verify(quartzScheduler, Mockito.never()).scheduleJob(ArgumentMatchers.any(JobDetail.class), ArgumentMatchers.any(Trigger.class));
}
Aggregations