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
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
-
Method Summary
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, isNotNull, toString
-
Constructor Details
-
MessageMatcher
-
-
Method Details
-
matches
-
describeTo
public void describeTo(org.hamcrest.Description description)
-