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.

Reply via email to