Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A543F4536 for ; Mon, 9 May 2011 12:32:36 +0000 (UTC) Received: (qmail 45460 invoked by uid 500); 9 May 2011 12:32:36 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 45428 invoked by uid 500); 9 May 2011 12:32:36 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 45420 invoked by uid 99); 9 May 2011 12:32:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 12:32:36 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tarjei@scanmine.com designates 89.221.243.222 as permitted sender) Received: from [89.221.243.222] (HELO eyr.scanmine.com) (89.221.243.222) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 12:32:31 +0000 Received: from localhost (unknown [127.0.0.1]) by eyr.scanmine.com (Postfix) with ESMTP id 6A6D1332EB5 for ; Mon, 9 May 2011 12:32:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at scanmine.com Received: from eyr.scanmine.com ([127.0.0.1]) by localhost (eyr.scanmine.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t3ULK3nX8aWU for ; Mon, 9 May 2011 14:32:08 +0200 (CEST) Received: from [192.168.0.104] (167.80-203-125.nextgentel.com [80.203.125.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by eyr.scanmine.com (Postfix) with ESMTP id C03C2332EA7 for ; Mon, 9 May 2011 14:32:07 +0200 (CEST) Message-ID: <4DC7DEC6.3040506@scanmine.com> Date: Mon, 09 May 2011 14:32:06 +0200 From: Tarjei Huse User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2.104i Thunderbird/3.1.10 ThunderBrowse/3.3.5 MIME-Version: 1.0 To: users@camel.apache.org Subject: Re: Append endpoint to route at test-time. References: <4DC68229.2020505@scanmine.com> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 > wrote: >> +1 >> >> 2011/5/9 Claus Ibsen >> >>> On Sun, May 8, 2011 at 1:44 PM, Tarjei Huse 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