Versions Compared

Key

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

...

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

Here is an example using Java Config.

Wiki Markup
{snippet:lang=java|id=example|url=activemq/camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java}

This is similar to the XML Config example above except that there is no XML file and instead the nested ContextConfig class does all of the configuration; so your entire test case is contained in a single Java class. We currently have to reference by class name this class in the @ContextConfiguration which is a bit ugly. Please vote for SJC-238 to address this and make Spring Test work more cleanly with Spring JavaConfig.

Adding more Mock expectations

...