I got stuck on the same point... there is a good explanation in the Camel 3 
migration guide: 
https://camel.apache.org/manual/latest/camel-3-migration-guide.html

Search for "advice" in that page.

-Steve

> -----Original Message-----
> From: mail4...@gmail.com <mail4...@gmail.com>
> Sent: Thursday, June 24, 2021 2:23 AM
> To: users@camel.apache.org
> Subject: How to adviceWith in Camel 3.10 ?
> 
> Hello.
> 
> Seems it is unable to adviceWith route definitions in Camel 3.10 anymore.
> Isn't it?
> 
> My project is SpringBoot project with dependensies:
> - camel-spring-boot-starter:3.10.0,
> - spring-boot-starter-test,
> - camel-test-spring-junit5:3.10.0
> 
> I got stuck on writing my test.
> My intention is to skip original endpoint and to use mock instead of it.
> I have already tried several approaches to implement a test and my last test
> looks like:
> 
> @ActiveProfiles("test")
> @CamelSpringBootTest
> @ContextConfiguration(classes = SpreingBootApplication.class)
> @MockEndpoints("direct://" + QUEUE_CARD_ISSUED_NOTIFICATION)
> @UseAdviceWith public class CardIssuingTest extends CamelTestSupport {
>     // ...
> }
> 
> 
> But when I do
> 
> context.getRouteTemplateDefinition("my-route")
> 
> it returns a RouteDefinition object that does not provide adviceWith()
> method.
> 
> So...
> How to adviceWith? What is the latest approach to test application with
> SpringBoot, Camel, JUnit5?
> 
> 
> _________________
> Vyacheslav Boyko,
> mailto:mail4...@gmail.com

Reply via email to