Re: help unit testing route

2012-05-09 Thread Claus Ibsen
                           .to("bean:exceptionHandle"); > > Does camel test provide a way to mock the DSL steps? Something like... > > when(from("aws-sqs://queuetest")).thenReturn(new Pojo()) > when(to("bean:springbean")).thenReturn("choice 2"

help unit testing route

2012-05-09 Thread ecimionatto
ot;); Does camel test provide a way to mock the DSL steps? Something like... when(from("aws-sqs://queuetest")).thenReturn(new Pojo()) when(to("bean:springbean")).thenReturn("choice 2") Thanks, Edson -- View this message in context: http://camel.465427.n5.nabble.com/help-unit-testing-route-tp5698480.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Unit Testing Route

2011-01-23 Thread Claus Ibsen
I have created a ticket https://issues.apache.org/jira/browse/CAMEL-3578 On Thu, Dec 2, 2010 at 9:26 AM, Olivier.Roger wrote: > > I agree, that would be nice to create mockEndpoint from any existing endpoint > -- > View this message in context: > http://camel.465427.n5.nabble.c

Re: Unit Testing Route

2010-12-02 Thread Olivier.Roger
I agree, that would be nice to create mockEndpoint from any existing endpoint -- View this message in context: http://camel.465427.n5.nabble.com/Unit-Testing-Route-tp3284803p3289035.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Unit Testing Route

2010-12-01 Thread Tommy Chheng
Yeah I have been meant to added some more nicer syntax sugar for the approach above with the adviceWith and intercept in the Camel Test Kit. We should have something so you can easily instruct Camel to not send to X but send to mock:X instead (or what you want). Also to more easily replace parts

Re: Unit Testing Route

2010-11-29 Thread Claus Ibsen
On Mon, Nov 29, 2010 at 7:01 PM, Claus Straube wrote: > > Hi, > > you can do this by intercepting your routes. > > public void testFoo() throws Exception { >  RouteDefinition route = context.getRouteDefinitions().get("routeId"); > route.adviceWith(context, new RouteBuilder() { >   public void conf

Re: Unit Testing Route

2010-11-29 Thread Claus Straube
Hi, you can do this by intercepting your routes. public void testFoo() throws Exception { RouteDefinition route = context.getRouteDefinitions().get("routeId"); route.adviceWith(context, new RouteBuilder() { public void configure() throws Exception { interceptSendToEndpoint("seda:in")

Unit Testing Route

2010-11-29 Thread Olivier.Roger
than duplicating the endpoint URI (B and B' here) for intermediate endpoints. Thanks in advance for your input! -- View this message in context: http://camel.465427.n5.nabble.com/Unit-Testing-Route-tp3284803p3284803.html Sent from the Camel - Users mailing list archive at Nabble.com.