Alex created CAMEL-16229:
----------------------------
Summary: Mocking Existing Endpoints Doc Not Updated
Key: CAMEL-16229
URL: https://issues.apache.org/jira/browse/CAMEL-16229
Project: Camel
Issue Type: Bug
Components: documentation
Affects Versions: 3.7.2
Reporter: Alex
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]
{code:java}
AdviceWith.adviceWith(context.getRouteDefinitions().get(0), context,
new AdviceWithRouteBuilder() {
@Override
public void configure() throws Exception {
// mock all endpoints
mockEndpoints();
}
});
{code}
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:
{code}
AdviceWith.adviceWith(context, "myRoute", a -> {
a.replaceFromWith("direct:start");
}
{code}
Also some extensive examples using Spring Boot and mocking will be greatly
appreciated.
Best Regards,
Alexander
--
This message was sent by Atlassian Jira
(v8.3.4#803005)