Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
src/main/java/com/mycompany/MyCamelTest.class
src/main/resources/com/mycompany/MyCamelTest-context.xml

You can overload the method createApplicationContext to provide the Spring ApplicationContext that isn't following the above default. For instance:

...


  protected AbstractXmlApplicationContext createApplicationContext() {
    return new ClassPathXmlApplicationContext("/config/MySpringConfig.xml");
  }

Then the test method will then run which invokes the MockEndpoint.assertIsSatisfied(camelContext) method which asserts that all of the Mock and Test endpoints have their expectations met.

xml}

Spring Test with Java Config Example

...