Friday, 15 February 2008

Easier Integration & Pattern testing with Camel and Spring 2.5

I'm really liking the testing features in Spring 2.5.x for easier unit testing with JUnit 3.8, 4.x or TestNG using Spring to do all your dependency injection before invoking your test classes.

I've just created a little document to show how to use Spring Testing with Camel, using the Camel Mock and Test endpoints for easier Enterprise Integration Pattern based testing. Incidentally Camel now has a new little Test endpoint which creates a Mock endpoint that automatically pulls its expected message bodies from another endpoint and auto-wires up the expectations for easier testing with minimal coding.


Richard said...


The version of Fuse [] I'm using doesn't have the class ApplicationContextTestSupport in it.

Do you have an example how to do the same thing in ?

James Strachan said...

The examples on this page :

use the base class AbstractJUnit38SpringContextTests which is part of the spring-test jar.

James Strachan said...

BTW FUSE ESB is a release of the ESB; for the latest/greatest Camel release from IONA grab the FUSE Mediation Router

Richard said...

Thanks, I'll take a look.