Class AbstractRequestResponseScenarioTests
java.lang.Object
org.springframework.integration.test.support.AbstractRequestResponseScenarioTests
- Direct Known Subclasses:
SingleRequestResponseScenarioTests
Convenience class for testing Spring Integration request-response message scenarios.
Users create subclasses to execute on or more
RequestResponseScenario
tests.
each scenario defines:
- An inputChannelName
- An outputChannelName
- A payload or message to send as a request message on the inputChannel
- A handler to validate the response received on the outputChannel
- Author:
- David Turanski, Gary Russell, Artem Bilan
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract List<RequestResponseScenario>
Implement this method to define RequestResponse scenariosvoid
setUp()
void
Execute each scenario.
-
Constructor Details
-
AbstractRequestResponseScenarioTests
public AbstractRequestResponseScenarioTests()
-
-
Method Details
-
setUp
public void setUp() -
testRequestResponseScenarios
public void testRequestResponseScenarios()Execute each scenario. Instantiate the message channels, send the request message on the input channel and invoke the validator on the response received on the output channel. This can handle subscribable or pollable output channels. -
defineRequestResponseScenarios
Implement this method to define RequestResponse scenarios- Returns:
- - A List of
RequestResponseScenario
-