use of org.candlepin.model.CandlepinModeChange in project candlepin by candlepin.
the class PinsetterKernelTest method init.
@Before
public void init() throws SchedulerException {
sched = mock(Scheduler.class);
jfactory = mock(JobFactory.class);
jcurator = mock(JobCurator.class);
jlistener = mock(JobListener.class);
sfactory = mock(StdSchedulerFactory.class);
lm = mock(ListenerManager.class);
modeManager = mock(ModeManager.class);
triggerListener = mock(PinsetterTriggerListener.class);
config = new MapConfiguration(new HashMap<String, String>() {
{
put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
put("org.quartz.threadPool.threadCount", "25");
put("org.quartz.threadPool.threadPriority", "5");
put(ConfigProperties.DEFAULT_TASKS, JobCleaner.class.getName());
put(ConfigProperties.TASKS, ImportRecordJob.class.getName());
}
});
when(sfactory.getScheduler()).thenReturn(sched);
when(sched.getListenerManager()).thenReturn(lm);
when(modeManager.getLastCandlepinModeChange()).thenReturn(new CandlepinModeChange(new Date(System.currentTimeMillis()), CandlepinModeChange.Mode.NORMAL, CandlepinModeChange.Reason.STARTUP));
}
Aggregations