camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Commented: (CAMEL-3578) MockEndpoint - Add feature to mock any endpoint
Date Mon, 24 Jan 2011 09:25:43 GMT


Claus Ibsen commented on CAMEL-3578:

The Spring XML version supports using include, so you can leave the original XML file untouched

For example if that file is named {{camel-route.xml}}, you can add a 2nd file, eg {{camel-test.xml}}
as shown below:
    <import resource="camel-route.xml"/>

    <!-- bean which enables mocking all endpoints -->
    <bean id="mockAllEndpoints" class="org.apache.camel.impl.InterceptSendToMockEndpointStrategy"/>

Then boot-up the {{camel-test.xml}} file as a plain spring app for testing.

> MockEndpoint - Add feature to mock any endpoint
> -----------------------------------------------
>                 Key: CAMEL-3578
>                 URL:
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.5.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.7.0
> See nabble
> The idea is to be able to mock any endpoint on a route and thus be able to set expectations.
> In the 2.x architecture we will have to implement this using the adviceWith as the route
must be {{re-processed}} so we can add the interceptor logic to mock
> any endpoints.
> In Camel 3.x this could be applied dynamically on the Channel.

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

View raw message