camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpcook <>
Subject Unit Tests without
Date Thu, 07 May 2009 15:24:00 GMT

I have upgraded to Camel 2 and I'm trying to write a unit test.

Before I just extended from ContextTestSupport but now it seems I have to
extend from CamelTestSupport.

I have a really simple unit test:
public void testObservationsRouteBuilder() throws InterruptedException {
        /*MockEndpoint resultEndpoint = context.getEndpoint("mock:After",

        sendBody("seda:groovytest", "testbody");
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new ObservationsRouteBuilder();        	

But it just blows up complaining that it can't find on the
classpath. I've looked at the source for CamelTestSupport and seems this is
the problem.

protected Context createJndiContext() throws Exception {
        InputStream in =
        assertNotNull("Cannot find on the classpath!", in);
        Properties properties = new Properties();
        return new InitialContext(new Hashtable(properties));

Do I really have to have this file which was part of
camel-core-1.4.0-tests.jar and if so why and where do I put it now?

View this message in context:
Sent from the Camel - Users (activemq) mailing list archive at

View raw message