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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA transformation to be applied to a received message before asserting, e.g. to only inspect the payload. -
Constructor Summary
ConstructorsConstructorDescriptionMessageQueueMatcher(org.hamcrest.Matcher<T> delegate, long timeout, TimeUnit unit, MessageQueueMatcher.Extractor<org.springframework.messaging.Message<?>, T> extractor) -
Method Summary
Modifier and TypeMethodDescriptionvoiddescribeMismatch(Object item, org.hamcrest.Description description) voiddescribeTo(org.hamcrest.Description description) booleanstatic <P> MessageQueueMatcher<P>receivesMessageThat(org.hamcrest.Matcher<org.springframework.messaging.Message<P>> messageMatcher) static <P> MessageQueueMatcher<P>receivesPayloadThat(org.hamcrest.Matcher<P> payloadMatcher) Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
-
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
-
describeMismatch
- Specified by:
describeMismatchin interfaceorg.hamcrest.Matcher<T>- Overrides:
describeMismatchin classorg.hamcrest.BaseMatcher<BlockingQueue<org.springframework.messaging.Message<?>>>
-
within
-
immediately
-
indefinitely
-
describeTo
public void describeTo(org.hamcrest.Description description)
-