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 B31E6DFA5 for ; Sun, 1 Jul 2012 07:37:33 +0000 (UTC) Received: (qmail 84545 invoked by uid 500); 1 Jul 2012 07:37:32 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 84425 invoked by uid 500); 1 Jul 2012 07:37:32 -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 84408 invoked by uid 99); 1 Jul 2012 07:37:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jul 2012 07:37:31 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jul 2012 07:37:27 +0000 Received: by lbok6 with SMTP id k6so7817877lbo.32 for ; Sun, 01 Jul 2012 00:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=YxYsTL22ZpYTq+r/EjWeWBEwHJDj2Md5HwnyZyyaivo=; b=mw8sYiOdlpG507niCCzhOnozhWbynC+HPVLrEkdT+8w+3Dy/knSWG3Hmfys4RSREwI tz3Q5Ug+WUcxJUrSWvMbj6rLx3F+ZtoLDKORvb3KK4GIhKRwj/xDVdVFQXJxjuarM6zp a8TufTZS5U7/qhCETwMonzE76iRgN/Vz8ngJkW4YwSjPkvddna4ZLuNhNgA5APbbBDJJ 1gHo5url0Wmb4iMZffKMzhEk34SCfauf8pO0q6JerZUkonUjmSXes1Y5HhyLjGRqGMgY 825+CLNvgzhJ4bB6ET78A/o5nElZPaSCCkgdJRQ9B2X7hQuQtma0c07OhkfMYwcBGgfF 5DdA== Received: by 10.152.146.101 with SMTP id tb5mr8408213lab.0.1341128226125; Sun, 01 Jul 2012 00:37:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.49.73 with HTTP; Sun, 1 Jul 2012 00:36:45 -0700 (PDT) In-Reply-To: <1341127295845-5715327.post@n5.nabble.com> References: <1341127295845-5715327.post@n5.nabble.com> From: Claus Ibsen Date: Sun, 1 Jul 2012 09:36:45 +0200 Message-ID: Subject: Re: Unit testing of an existing RouteBuilder class To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi Yeah I suggest to read these couple of links http://camel.apache.org/advicewith.html http://camel.apache.org/mock For example the advice with allows you to manipulate the routes before unit testing. And mock allows to mock endpoints by pattern, and whether to skip sending to the target endpoint or not. On Sun, Jul 1, 2012 at 9:21 AM, gilboy wrote: > Hi > > I was reading how camel supports unit testing of an existing RouteBuilder > class. > > I think this is very useful as I don't want to have to duplicate the route > in the unit test. > > However, suppose the route defined in the existing RouteBuilder class > contains an endpoint that I need to mock. Is there anyway after loading the > route in the unit test class that I can replace the endpoint that needs to > be mocked? > > Thanks > > -- > View this message in context: http://camel.465427.n5.nabble.com/Unit-testing-of-an-existing-RouteBuilder-class-tp5715327.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cibsen@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen