You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Jonathan Anstey (JIRA)" <ji...@apache.org> on 2008/06/10 02:59:00 UTC

[jira] Updated: (CAMEL-460) Add spring unit tests for the intercept() feature

     [ https://issues.apache.org/activemq/browse/CAMEL-460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Anstey updated CAMEL-460:
----------------------------------

    Attachment: camel-460.patch

I added a test case for the spring xml intercept feature... which seems to have uncovered an error... figured I'd submit this patch now to bump up the visibility of the problem.

I basically followed the schema to see how to get this

{code}
<route>
  <intercept>
    <choice>
      <when>
        <xpath>$foo = 'bar'</xpath>
        <to uri="mock:b"/>
      </when>
      <otherwise>
        <proceed/>
      </otherwise>
    </choice>
  </intercept>
</route>
<route>
  <from uri="direct:start"/>
  <to uri="mock:a"/>
</route>
{code}

from this

{code}
intercept().choice().when(header("foo").isEqualTo("bar")).to("mock:b").otherwise().proceed();

from("direct:start").to("mock:a");
{code}

Seems to be valid syntax except that the routes loaded up in the DSL are nothing like the Spring XML ones :) I think this will involve a deeper code dive!

> Add spring unit tests for the intercept() feature
> -------------------------------------------------
>
>                 Key: CAMEL-460
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-460
>             Project: Apache Camel
>          Issue Type: Test
>          Components: camel-spring
>    Affects Versions: 1.3.0
>            Reporter: Jonathan Anstey
>            Assignee: Jonathan Anstey
>             Fix For: 1.4.0
>
>         Attachments: camel-460.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.