Class PollAnticipator


  • public class PollAnticipator
    extends java.lang.Object

    PollAnticipator class.

    Version:
    $Id: $
    Author:
    brozow
    • Constructor Detail

      • PollAnticipator

        public PollAnticipator()
    • Method Detail

      • anticipateAllServices

        public void anticipateAllServices​(MockElement element)

        anticipateAllServices

        Parameters:
        element - a MockElement object.
      • anticipatePoll

        public void anticipatePoll​(MockService svc)

        anticipatePoll

        Parameters:
        svc - a MockService object.
      • reset

        public void reset()

        reset

      • unanticipatedPolls

        public java.util.Collection<MockService> unanticipatedPolls()

        unanticipatedPolls

        Returns:
        a Collection object.
      • waitForAnticipated

        public java.util.Collection<MockService> waitForAnticipated​(long millis)
        Waits for millis milliseconds for the anticipated polls to come. If they all come in before the timeout return an empty list. Otherwise return a read-only list of the services that were anticipated but not received.
        Parameters:
        millis - a long.
        Returns:
        a Collection object.