org.springframework.integration.test.matcher
Class PayloadAndHeaderMatcher
java.lang.Object
org.hamcrest.BaseMatcher<Message<?>>
org.springframework.integration.test.matcher.PayloadAndHeaderMatcher
- All Implemented Interfaces:
- org.hamcrest.Matcher<Message<?>>, org.hamcrest.SelfDescribing
public class PayloadAndHeaderMatcher
- extends org.hamcrest.BaseMatcher<Message<?>>
Matcher to make assertions about message equality easier. Usage:
@Test
public void testSomething() {
Message expected = ...;
Message result = ...;
assertThat(result, sameExceptImmutableHeaders(expected));
}
@Factory
public static Matcher> sameExceptImmutableHeaders(Message> expected) {
return new PayloadAndHeaderMatcher(expected);
}
Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
sameExceptIgnorableHeaders
public static org.hamcrest.Matcher<Message<?>> sameExceptIgnorableHeaders(Message<?> expected,
java.lang.String... ignoreKeys)
matches
public boolean matches(java.lang.Object arg)
describeTo
public void describeTo(org.hamcrest.Description description)