Esempio n. 1
0
 @Test
 public void shouldCreateTimerGivenTheAttributeMapOnlyOnChangesIsNotPresent() {
   HashMap<String, String> mapOfTimerValues = new HashMap<String, String>();
   mapOfTimerValues.put(TimerConfig.TIMER_SPEC, "0 0 * * * ?");
   TimerConfig timer = TimerConfig.createTimer(mapOfTimerValues);
   assertThat(timer.getTimerSpec(), is("0 0 * * * ?"));
   assertThat(timer.shouldTriggerOnlyOnChanges(), is(false));
 }
Esempio n. 2
0
 @Test
 public void shouldCreateTimerGivenTheAttributeMapIfOnlyOnChangesIsNotCheckedInUI() {
   HashMap<String, String> mapOfTimerValues = new HashMap<String, String>();
   mapOfTimerValues.put(TimerConfig.TIMER_SPEC, "0 0 * * * ?");
   mapOfTimerValues.put(TimerConfig.TIMER_ONLY_ON_CHANGES, "0");
   TimerConfig timer = TimerConfig.createTimer(mapOfTimerValues);
   assertThat(timer.getTimerSpec(), is("0 0 * * * ?"));
   assertThat(timer.getOnlyOnChanges(), is(false));
 }