@Test public void testSetRepeatCount() { trigger.setRepeatCount(expectedTriggerCount); Date now = startDate; for (int i = 0; i < expectedTriggerCount; i++) { trigger.triggered(now); now = new Date(now.getTime() + period); } assertTrue(trigger.getNextExecutionAfter(startDate) == null); try { trigger.triggered(now); fail("Trigger should have complained"); } catch (IllegalStateException e) { } }
public void setRepeatCount(long repeatCount) { this.repeatCount = repeatCount; }
PeriodicJobTrigger implements JobTrigger { public void setRepeatCount(long repeatCount) { this.repeatCount = repeatCount; } }
PeriodicJobTrigger implements JobTrigger { public void setRepeatCount(long repeatCount) { this.repeatCount = repeatCount; } PeriodicJobTrigger(long period);  PeriodicJobTrigger(long period, boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime);  PeriodicJobTrigger(long period, Date startTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat, boolean startImmediately); }
PeriodicJobTrigger implements JobTrigger { public void setRepeatCount(long repeatCount) { this.repeatCount = repeatCount; } PeriodicJobTrigger(long period);  PeriodicJobTrigger(long period, boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime);  PeriodicJobTrigger(long period, Date startTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat, boolean startImmediately); @Override Object clone(); Date getNextExecutionAfter(Date date); void triggered(Date date); long getPeriod(); void setPeriod(long period); void setRepeatCount(long repeatCount); long getRepeatCount(); boolean getStartsImmediately(); void setStartImmediately(boolean startImmediately); void reset(); @Override String toString(); }
PeriodicJobTrigger implements JobTrigger { public void setRepeatCount(long repeatCount) { this.repeatCount = repeatCount; } PeriodicJobTrigger(long period);  PeriodicJobTrigger(long period, boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime);  PeriodicJobTrigger(long period, Date startTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat, boolean startImmediately); @Override Object clone(); Date getNextExecutionAfter(Date date); void triggered(Date date); long getPeriod(); void setPeriod(long period); void setRepeatCount(long repeatCount); long getRepeatCount(); boolean getStartsImmediately(); void setStartImmediately(boolean startImmediately); void reset(); @Override String toString();  }