INT-1257, added tests and minor modification to support MessageHistory in MAIL, JDBC, IP, HTTP modules

This commit is contained in:
Oleg Zhurakousky
2010-09-21 22:15:37 -04:00
parent fa570a4295
commit c4d31af848
15 changed files with 96 additions and 21 deletions

View File

@@ -10,6 +10,8 @@
http://www.springframework.org/schema/integration/http
http://www.springframework.org/schema/integration/http/spring-integration-http.xsd">
<si:message-history/>
<si:channel id="requests">
<si:queue capacity="1"/>
</si:channel>

View File

@@ -36,6 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
import org.springframework.integration.Message;
import org.springframework.integration.core.PollableChannel;
import org.springframework.integration.history.MessageHistory;
import org.springframework.integration.http.HttpRequestHandlingController;
import org.springframework.integration.http.HttpRequestHandlingMessagingGateway;
import org.springframework.integration.http.MockHttpServletRequest;
@@ -109,6 +110,8 @@ public class HttpInboundChannelAdapterParserTests {
postOnlyAdapter.handleRequest(request, response);
assertEquals(HttpServletResponse.SC_OK, response.getStatus());
Message<?> message = requests.receive(0);
MessageHistory history = MessageHistory.read(message);
assertTrue(history.containsComponent("postOnlyAdapter"));
assertNotNull(message);
assertEquals("test", message.getPayload());
}