camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tarjei Huse <tar...@scanmine.com>
Subject Re: Append endpoint to route at test-time.
Date Mon, 09 May 2011 12:32:06 GMT
On 05/09/2011 02:28 PM, Claus Ibsen wrote:
> Hi
>
> I created a ticket to track this idea
> https://issues.apache.org/jira/browse/CAMEL-3958
Great. Thanks for the quick turnaround on this.
T
> On Mon, May 9, 2011 at 8:24 AM, Romain Manni-Bucau
> <rmannibucau@gmail.com> wrote:
>> +1
>>
>> 2011/5/9 Claus Ibsen <claus.ibsen@gmail.com>
>>
>>> On Sun, May 8, 2011 at 1:44 PM, Tarjei Huse <tarjei@scanmine.com> wrote:
>>>> Hi,
>>>>
>>>> I got a route like this:
>>>> from(bookKeeperQueue).routeId("BookKeeperRoute")
>>>>            .process(new BookKeeperProcessor(bookKeeper));
>>>>
>>>> That I would like to test by appending a mock endpoint to the route and
>>>> avaiting for it to receive the message.
>>>>
>>>> I could add a .to(log:something) at the end of the route, but I would
>>>> find it more pleasing if I could just append an endpoint to the route
>>>> using the new adviceWith() functionality.
>>>>
>>>> Is this possible?
>>>>
>>> Yeah there is AdviceWithRouteBuilder that can help with this
>>> http://camel.apache.org/advicewith.html
>>>
>>> But we could probably improve it a bit by adding a method to more
>>> easily addLast, which could be common to do. Eg to add a mock at the
>>> end.
>>>
>>> Likewise you may want to add a mock at the start, so we could have an
>>> addFirst as well.
>>>
>>>
>>>> --
>>>> Regards / Med vennlig hilsen
>>>> Tarjei Huse
>>>> Mobil: 920 63 413
>>>>
>>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -----------------
>>> FuseSource
>>> Email: cibsen@fusesource.com
>>> Web: http://fusesource.com
>>> CamelOne 2011: http://fusesource.com/camelone2011/
>>> Twitter: davsclaus
>>> Blog: http://davsclaus.blogspot.com/
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>
>
>


-- 
Regards / Med vennlig hilsen
Tarjei Huse
Mobil: 920 63 413


Mime
View raw message