Class NotificationAnticipator


  • public class NotificationAnticipator
    extends java.lang.Object
    Author:
    brozow
    • Constructor Detail

      • NotificationAnticipator

        public NotificationAnticipator()
    • Method Detail

      • setExpectedDifference

        public void setExpectedDifference​(long expectedDiff)
        Parameters:
        expectedDiff -
      • getExpectedDifference

        public long getExpectedDifference()
        Returns:
      • anticipateNotification

        public void anticipateNotification​(MockNotification mn)
        Parameters:
        event -
      • notificationReceived

        public void notificationReceived​(MockNotification mn)
        Parameters:
        event -
      • getAnticipatedNotifications

        public java.util.Collection<MockNotification> getAnticipatedNotifications()
      • reset

        public void reset()
      • getUnanticipated

        public java.util.Collection<MockNotification> getUnanticipated()
        Returns:
      • waitForAnticipated

        public java.util.Collection<MockNotification> waitForAnticipated​(long millis)
        Parameters:
        i -
        Returns:
      • verifyAnticipated

        public void verifyAnticipated​(long lastNotifyTime,
                                      long waitTime,
                                      long sleepTime)