Hi

There is a method you need to override, and return 0 for
getExepctedRoute or something like that.

But yeah I think we can remove that old assertion, as its not as
relevant anymore. I guess it was used as a failsafe to ensure the
spring bits get started up. Its from the old 1.x days.

Feel free to create a JIRA ticket.


On Wed, Feb 22, 2012 at 1:16 PM, Preben.Asmussen <[email protected]> wrote:
> Hi
>
> Seems that there is an error in Camel test support for
> CamelSpringTestSupport when u want to use adviceWith on a Spring DSL defined
> route.
>
>        @Override
>        public boolean isUseAdviceWith() {
>                // tell we are using advice with, which allows us to advice 
> the route
>                // before Camel is being started, and thus can replace 
> activemq with
>                // something else.
>                return true;
>        }
>
>        @Test
>        public void testExample() throws Exception {
>                context.getRouteDefinition("myroute").adviceWith(context, new
> AdviceWithRouteBuilder() {
>                        @Override
>                        public void configure() throws Exception {
>                                replaceFromWith("direct:start");
>                                // 
> weaveById("publisher").after().to("mock:tracks");
>                        }
>                });
>                context.start();
>
>
> When the route startes I get an error 'Should have at least one route' from
> assertValidContext in CamelSpringTestSupport.
>
> Is this expected ? And shouldn't CamelSpringTestSupport behave like
> CamelTestSupport ?
>
> cheers
> Preben
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Using-adviceWith-in-CamelSpringTestSupport-tp5504936p5504936.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to