Add non-parametrized message support to PayloadMatcher.

- add testcase (which used to cause compiler failure)
- remove <?> from PayloadMatcher to fix error
- add casts to FileInboundCAWRDTests to deal with backwards compatibility breakage

In some cases backwards compatibility is broken, see INT-1790 for details.
This commit is contained in:
Iwein Fuld
2011-02-08 14:32:54 +01:00
parent 57192121fb
commit 3955c9d6fb
3 changed files with 16 additions and 9 deletions

View File

@@ -36,7 +36,7 @@ public class PayloadMatcherTests {
static final BigDecimal ANY_PAYLOAD = new BigDecimal("1.123");
Message<BigDecimal> message =MessageBuilder.withPayload(ANY_PAYLOAD).build();;
Message<BigDecimal> message = MessageBuilder.withPayload(ANY_PAYLOAD).build();
@Test
public void hasPayload_withEqualValue_matches() throws Exception {
@@ -69,4 +69,11 @@ public class PayloadMatcherTests {
assertTrue(ae.getMessage().contains("Expected: a Message with payload: "));
}
}
@Test
public void shouldMatchNonParametrizedMessage() throws Exception {
Message message = this.message;
assertThat(message, hasPayload(new BigDecimal("1.123")));
}
}