Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16229

Mocking Existing Endpoints Doc Not Updated

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.7.2
    • 3.9.0
    • documentation
    • 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

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            sashok_bg Alex
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: