Class MessageMatcher
java.lang.Object
org.hamcrest.BaseMatcher<Message<?>>
org.springframework.integration.test.matcher.MessageMatcher
- All Implemented Interfaces:
org.hamcrest.Matcher<Message<?>>
,org.hamcrest.SelfDescribing
public class MessageMatcher extends org.hamcrest.BaseMatcher<Message<?>>
Matcher to make assertions about message equality easier. Usage:
@Test
public void testSomething() {
Message<String> expected = ...;
Message<String> result = ...;
assertThat(result, sameExceptImmutableHeaders(expected));
}
@Factory
public static Matcher<Message<?>> sameExceptImmutableHeaders(Message<?> expected) {
return new MessageMatcher(expected);
}
- Author:
- Dave Syer, Artem Bilan
-
Constructor Summary
Constructors Constructor Description MessageMatcher(Message<?> operand)
-
Method Summary
Modifier and Type Method Description void
describeTo(org.hamcrest.Description description)
boolean
matches(Object arg)
-
Constructor Details
-
Method Details
-
matches
-
describeTo
public void describeTo(org.hamcrest.Description description)
-