Versions Compared

Key

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

...

You might also want to add commons-logging and log4j to ensure nice logging messages (and maybe adding a log4j.properties file into your src/test/resources directory).

...

You firstly need to derive from the class CamelTestSupport and typically you will need to override the createRouteBuilder() method to create routes to be tested.

Here is an example.

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

...

So you will also need to create a jndi.properties file in your src/test/resources directory so that there is a default registry available to initialise the CamelContext.

Here is an example jndi.properties file

Code Block
java.naming.factory.initial = org.apache.camel.util.jndi.CamelInitialContextFactory

...