use of org.springframework.integration.store.MessageStore in project spring-integration by spring-projects.
the class ClaimCheckParserTests method checkMessageStoreReferenceOnCheckIn.
@Test
public void checkMessageStoreReferenceOnCheckIn() {
ClaimCheckInTransformer transformer = (ClaimCheckInTransformer) new DirectFieldAccessor(new DirectFieldAccessor(checkin).getPropertyValue("handler")).getPropertyValue("transformer");
MessageStore messageStore = (MessageStore) new DirectFieldAccessor(transformer).getPropertyValue("messageStore");
assertEquals(context.getBean("testMessageStore"), messageStore);
}
use of org.springframework.integration.store.MessageStore in project spring-integration by spring-projects.
the class ClaimCheckTransformerTests method store.
@Test
public void store() {
MessageStore store = new SimpleMessageStore(10);
ClaimCheckInTransformer transformer = new ClaimCheckInTransformer(store);
Message<?> input = MessageBuilder.withPayload("test").build();
Message<?> output = transformer.transform(input);
assertEquals(input.getHeaders().getId(), output.getPayload());
}
use of org.springframework.integration.store.MessageStore in project spring-integration by spring-projects.
the class ClaimCheckTransformerTests method retrieve.
@Test
public void retrieve() {
MessageStore store = new SimpleMessageStore(10);
Message<?> message = MessageBuilder.withPayload("test").build();
UUID storedId = message.getHeaders().getId();
store.addMessage(message);
ClaimCheckOutTransformer transformer = new ClaimCheckOutTransformer(store);
Message<?> input = MessageBuilder.withPayload(storedId).build();
Message<?> output = transformer.transform(input);
assertEquals("test", output.getPayload());
}
use of org.springframework.integration.store.MessageStore in project spring-integration by spring-projects.
the class JdbcMessageStoreParserTests method testSimpleMessageStoreWithTemplate.
@Test
public void testSimpleMessageStoreWithTemplate() {
setUp("jdbcOperationsJdbcMessageStore.xml", getClass());
MessageStore store = context.getBean("messageStore", MessageStore.class);
assertTrue(store instanceof JdbcMessageStore);
}
use of org.springframework.integration.store.MessageStore in project spring-integration by spring-projects.
the class JdbcMessageStoreParserTests method testMessageStoreWithAttributes.
@Test
public void testMessageStoreWithAttributes() {
setUp("soupedUpJdbcMessageStore.xml", getClass());
MessageStore store = context.getBean("messageStore", MessageStore.class);
assertEquals("FOO", ReflectionTestUtils.getField(store, "region"));
assertEquals("BAR_", ReflectionTestUtils.getField(store, "tablePrefix"));
assertEquals(context.getBean(LobHandler.class), ReflectionTestUtils.getField(store, "lobHandler"));
}
Aggregations