Problems testing Camel with Spring config -


I have the routes defined in CamelRoutes.xml and I want to test them using The wrapping technique is described below.

My CamelRoutes.xml

  & lt; Route autoStartup = "true" xmlns = "http: / /camel.apache.org/schema/spring"> & Lt; From Yuri = "Direct: Start" /> & Lt; From Yuri = "direct: end" /> & Lt; / Route & gt;   

So I created with CamelRoutesTest.xml :

   & Lt; Bean id = "fake all points" class = "org.apache.camel.impl.InterceptSendToMockEndpointStrategy" />   

But I'm not sure how to prepare a test, which both the spring XML loads and provides access to the fake endpoint.

If I use ..

  @ContextConfiguration (places = ("/ CamelRoutesTest")) provides public class CamelTest AbstractJUnit38SpringContextTests}   

I do not know how to get fake endpoint

if I use ..

  public class CamelTest CamelTestSupport Provides}   

Then I do not know how to load my topical reference ..

I can not get an example test on the website which is CamelTestSupport And Spring uses load route xml.

Tom has already posted on the camel mailing list. I suggest that when you post a quote here, you will write it.

The answer has already been posted here

Comments