2008/11/28 Martin Gilday <[EMAIL PROTECTED]>:
> I seem to remember a discussion about making ContextTestSupport or a
> similar class public to aid end users in testing their camel contexts.
> Spring Testing support is very good if you want to inject your real
> context but quite often I would like to write a test which exercises
> only part of our processors/routes or just to experiment.  You then end
> up basically rewriting a class very similar to ContextTestSupport, so a
> camel-test module would be very useful.  I'm sure this has been brought
> up before but I can't find it on nabble or jira.

Yeah - I started the camel-hamcrest module in an effort to build on
hamcrest to do testing. There's also the camel-guice module which lets
you IoC tests using Guice.
http://activemq.apache.org/camel/guice.html

I think IoC based testing - whether via Spring testing or via Guice -
seems to be the easiest way to build them.

I wonder - what is it about the Spring Testing approach that you don't
like? e.g. you should be able to test out individual routes using this
approach?

As an aside - we should maybe create some demos of testing Camel
routes/processors/beans using the Java Config of Spring - so things
are more like the Guice approach of using a single Java class to host
everything rather than needing a Java class and an XML document.

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Reply via email to