Details
-
Task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.7.2
-
None
-
Novice
Description
The following documentation on mocking and testing existing routes is not updated for camel v3:
https://camel.apache.org/components/latest/mock-component.html#_mocking_existing_endpoints
AdviceWith.adviceWith(context.getRouteDefinitions().get(0), context, new AdviceWithRouteBuilder() { @Override public void configure() throws Exception { // mock all endpoints mockEndpoints(); } });
We can see in the migration guide here that context.getRouteDefinitions no longer exists:
https://camel.apache.org/manual/latest/camel-3-migration-guide.html
New style:
AdviceWith.adviceWith(context, "myRoute", a -> { a.replaceFromWith("direct:start"); }
Also some extensive examples using Spring Boot and mocking will be greatly appreciated.
Best Regards,
Alexander