Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: SubscribableChannel test helper?

  1. #11

    Default

    Gateway sounds to me like a way to test a service itself, not the whole orchestration, am I right?

    Anyway thanks Mark and Oleg, it's very refreshing to see your quick and good replies.

  2. #12
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Not necessarily. I guess I am missing exactly what you are trying to do, so may be you can explain.

    You can also go through our extensive library of samples https://github.com/SpringSource/spri...ration-samples where Gateway is used in many of them. May be that will answer some of your questions.

  3. #13
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,040

    Default

    ...But I do feel that this kind of test tools, even if they don't reside in the core, are quite needed,
    There is an abstract class in spring-integration-test (2.1.RC1) that does (I think) exactly what you want - it abstracts the channel type and you provide a handler, regardless. See

    Code:
    /**
     * Convenience class for testing Spring Integration request-response message scenarios. Users 
     * create subclasses to execute on or more {@link RequestResponseScenario} tests. each scenario defines:
     * <ul>
     * <li>An inputChannelName</li>
     * <li>An outputChannelName</li>
     * <li>A payload or message to send as a request message on the inputChannel</li>
     * <li>A handler to validate the response received on the outputChannel</li>
     * </ul>
     * @author David Turanski
     */
    @RunWith(SpringJUnit4ClassRunner.class)
    public abstract class AbstractRequestResponseScenarioTests {
    You extend this class - there are some examples of how to use it in src/test/java in that project. See MessageScenariosTests.

    HTH
    Last edited by Gary Russell; Dec 21st, 2011 at 09:13 AM.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  4. #14

    Default

    Gary thats great!

    That's exactly what I was looking for, thank you very much to all of you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •