Jeroen, Try using Spring's AbstractJUnit38SpringContextTests, or AbstractJUnit4SpringContextTests depending on the version of JUnit, to load up an application context containing a test Camel context defined via xml. And have spring autowire the context into you test class of course ;)
Something like: @ContextConfiguration(locations = { "classpath:camel.xml" }) public class CamelTest extends AbstractJUnit38SpringContextTests { @Autowired private CamelContext camelContext; ... } We do this frequently for integration testing of routes we've defined via xml. HTH, Doug On Tue, Mar 31, 2009 at 3:14 PM, Jeroen Reijn <j.re...@onehippo.com> wrote: > > Well I changed my patch, but am a bit stuck on the unit test part. It seems > that the error only occured while using the Spring XML configuration for > the > routes, so a unit test with just plain with plain java won't actually prove > that it works. > > I'm looking at the camel code base for some Spring XML configuration based > tests. I will try to add the unit test tomorrow. > > Regards, > > Jeroen > > > > Jeroen Reijn wrote: > > > > Oops it seems my patch brakes all file system based RSS tests :-( > > Will let you know once it's fixed :-) > > > > Jeroen > > > > Jeroen Reijn wrote: > >> > >> Hi Hadrian! > >> > >> thanks for your feedback. It was indeed fun to do. > >> I'll try to write the unit test today and attach it to the JIRA issue. > >> > >> I will reply here once the unit test is attached. > >> > >> Regards, > >> > >> Jeroen > >> > >> > >> > >> hzbarcea wrote: > >>> > >>> Hi Jeroen, > >>> > >>> Many thanks for reporting this and producing a patch. I trust it was > >>> a fun and rewarding experience. > >>> When things like these get fixed we need to add a unit test as well. > >>> It would be great if you could write one. If you cannot I will write > >>> one before committing your patch. Either way, you get the credit :). > >>> > >>> Great work, > >>> Hadrian > >>> > >>> > >>> On Mar 30, 2009, at 4:19 PM, Jeroen Reijn wrote: > >>> > >>>> > >>>> Hi all, > >>>> > >>>> I'm currently looking into Camel as a possible solution for one of my > >>>> projects. While trying out the Atom and Rss component I found out it > >>>> couldn't handle extra request parameters in the URL correctly. > >>>> > >>>> At first they were not allowed. When I set the component to use the > >>>> lenientproperties (as the httpcomponent does) it solved part of my > >>>> problem, > >>>> but then I found out that the actual URL called for the endpoint did > >>>> not > >>>> have the request parameters in the queryString anymore. They were > >>>> stripped > >>>> off when the component parsed the URI for it's needed parameters. > >>>> > >>>> I've created a patch to fix both issues for Atom and RSS endpoints and > >>>> attached it to JIRA [1]. > >>>> > >>>> I hope somebody can review my patch and perhaps it can be included > >>>> in the > >>>> camel project. Please let me know if you have any remarks. I would > >>>> appreciate all feedback. > >>>> > >>>> [1]https://issues.apache.org/activemq/browse/CAMEL-1496 > >>>> -- > >>>> View this message in context: > >>>> > http://www.nabble.com/Camel-RSS-and-Atom-components-tp22791987p22791987.html > >>>> Sent from the Camel - Users mailing list archive at Nabble.com. > >>>> > >>> > >>> > >>> > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Camel-RSS-and-Atom-components-tp22791987p22813514.html > Sent from the Camel - Users mailing list archive at Nabble.com. > >