You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/02/17 15:03:01 UTC
[jira] [Commented] (CAMEL-16229) Mocking Existing Endpoints Doc Not
Updated
[ https://issues.apache.org/jira/browse/CAMEL-16229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17285868#comment-17285868 ]
Claus Ibsen commented on CAMEL-16229:
-------------------------------------
People is welcome to help with docs. You can just click the "edit this page" button and submit a PR
> Mocking Existing Endpoints Doc Not Updated
> ------------------------------------------
>
> Key: CAMEL-16229
> URL: https://issues.apache.org/jira/browse/CAMEL-16229
> Project: Camel
> Issue Type: Task
> Components: documentation
> Affects Versions: 3.7.2
> Reporter: Alex
> Priority: Minor
> Fix For: 3.9.0
>
>
> 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)