@Test public void testIntervalHasPassed() { GregorianCalendar calendar = new GregorianCalendar(); calendar.setTime(new Date()); calendar.add(GregorianCalendar.HOUR, -2); notifier.updateLastNotificationTime(calendar.getTime()); assertTrue(notifier.intervalHasPassed()); }
protected boolean intervalHasPassed() { return Duration.between(lastNotificationTime.getTime().toInstant(), (new Date()).toInstant()) .compareTo(this.interval) > 0; }
TimedSummaryNotifier implements Runnable { protected boolean intervalHasPassed() { return Duration.between(lastNotificationTime.getTime().toInstant(), (new Date()).toInstant()) .compareTo(this.interval) > 0; } }
TimedSummaryNotifier implements Runnable { protected boolean intervalHasPassed() { return Duration.between(lastNotificationTime.getTime().toInstant(), (new Date()).toInstant()) .compareTo(this.interval) > 0; } TimedSummaryNotifier(List<NotifierEngine> engines, Duration interval,
            String[] tools, String mongodbHost, String mongodbName, Date notificationTime);  TimedSummaryNotifier(List<NotifierEngine> engines, Duration interval, String[] tools,
            String mongdbHost, String mongodbName); }
TimedSummaryNotifier implements Runnable { protected boolean intervalHasPassed() { return Duration.between(lastNotificationTime.getTime().toInstant(), (new Date()).toInstant()) .compareTo(this.interval) > 0; } TimedSummaryNotifier(List<NotifierEngine> engines, Duration interval,
            String[] tools, String mongodbHost, String mongodbName, Date notificationTime);  TimedSummaryNotifier(List<NotifierEngine> engines, Duration interval, String[] tools,
            String mongdbHost, String mongodbName); @Override void run(); }
TimedSummaryNotifier implements Runnable { protected boolean intervalHasPassed() { return Duration.between(lastNotificationTime.getTime().toInstant(), (new Date()).toInstant()) .compareTo(this.interval) > 0; } TimedSummaryNotifier(List<NotifierEngine> engines, Duration interval,
            String[] tools, String mongodbHost, String mongodbName, Date notificationTime);  TimedSummaryNotifier(List<NotifierEngine> engines, Duration interval, String[] tools,
            String mongdbHost, String mongodbName); @Override void run();  }