Class MessageQueueMatcher<T>

java.lang.Object
org.hamcrest.BaseMatcher<BlockingQueue<org.springframework.messaging.Message<?>>>
org.springframework.cloud.stream.test.matcher.MessageQueueMatcher<T>
Type Parameters:
T - return type
All Implemented Interfaces:
org.hamcrest.Matcher<BlockingQueue<org.springframework.messaging.Message<?>>>, org.hamcrest.SelfDescribing

public class MessageQueueMatcher<T> extends org.hamcrest.BaseMatcher<BlockingQueue<org.springframework.messaging.Message<?>>>
A Hamcrest Matcher meant to be used in conjunction with TestSupportBinder.
Author:
Eric Bottard, Janne Valkealahti
  • Constructor Details

    • MessageQueueMatcher

      public MessageQueueMatcher(org.hamcrest.Matcher<T> delegate, long timeout, TimeUnit unit, MessageQueueMatcher.Extractor<org.springframework.messaging.Message<?>,T> extractor)
  • Method Details

    • receivesMessageThat

      public static <P> MessageQueueMatcher<P> receivesMessageThat(org.hamcrest.Matcher<org.springframework.messaging.Message<P>> messageMatcher)
    • receivesPayloadThat

      public static <P> MessageQueueMatcher<P> receivesPayloadThat(org.hamcrest.Matcher<P> payloadMatcher)
    • matches

      public boolean matches(Object item)
    • describeMismatch

      public void describeMismatch(Object item, org.hamcrest.Description description)
      Specified by:
      describeMismatch in interface org.hamcrest.Matcher<T>
      Overrides:
      describeMismatch in class org.hamcrest.BaseMatcher<BlockingQueue<org.springframework.messaging.Message<?>>>
    • within

      public MessageQueueMatcher<T> within(long timeout, TimeUnit unit)
    • immediately

      public MessageQueueMatcher<T> immediately()
    • indefinitely

      public MessageQueueMatcher<T> indefinitely()
    • describeTo

      public void describeTo(org.hamcrest.Description description)