Yes of course there is a file :)

I found the problem after debugging camel, Rome has a dependency on jdom so
I needed that jar as well. 

Its just a shame camel swallows the exception and doesn't give you some more
meaningful information.

Thanks for your reply.


Claus Ibsen-2 wrote:
> 
> On Tue, Feb 9, 2010 at 8:07 PM, jpcook <[email protected]>
> wrote:
>>
>> Hi,
>>
>> I am trying to create a simple RSS unit test:
>>
>> @Test
>>        public void testPictureGalleryRSS() throws Exception {
>>                MockEndpoint mock = getMockEndpoint("mock:result");
>>                mock.expectedMessageCount(1);
>>                mock.assertIsSatisfied();
>>
>>                Exchange exchange = mock.getExchanges().get(0);
>>                Message in = exchange.getIn();
>>                assertNotNull(in);
>>        }
>>
>>       �...@override
>>        protected RouteBuilder createRouteBuilder()  {
>>        return new RouteBuilder() {
>>            public void configure() throws Exception {
>>                from("rss:file:testfeeds/picture_gallery/rss10.xml")
>>                        .convertBodyTo(String.class)
>>                                .to("mock:result");
>>            }
>>        };
>>    }
>>
> 
> Have you actually checked there is a file in that location
>      rss:file:testfeeds/picture_gallery/rss10.xml
> Could very well be there are no files found.
> 
> 
>> This is based on any one of the unit tests here:
>> http://svn.apache.org/viewvc/camel/trunk/components/camel-rss/src/test/java/org/apache/camel/component/rss/
>>
>> But when I run the test i just get:
>>
>> java.lang.AssertionError: mock://result Received message count. Expected:
>> <1> but was: <0>
>>        at
>> org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:913)
>>        at
>> org.apache.camel.component.mock.MockEndpoint.assertEquals(MockEndpoint.java:895)
>>        at
>> org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:230)
>>        at
>> org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:208)
>>        at
>> com.bbc.newsi.feeds.feedaugmentor.dslroutes.PictureGalleryRouteBuilderTest.testPictureGalleryRSS(PictureGalleryRouteBuilderTest.java:16)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at junit.framework.TestCase.runTest(TestCase.java:168)
>>        at junit.framework.TestCase.runBare(TestCase.java:134)
>>        at junit.framework.TestResult$1.protect(TestResult.java:110)
>>        at junit.framework.TestResult.runProtected(TestResult.java:128)
>>        at junit.framework.TestResult.run(TestResult.java:113)
>>        at junit.framework.TestCase.run(TestCase.java:124)
>>        at junit.framework.TestSuite.runTest(TestSuite.java:232)
>>        at junit.framework.TestSuite.run(TestSuite.java:227)
>>        at
>> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
>>        at
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
>>        at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>>        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>>        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>>        at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>>
>> Thanks
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Simple-RSS-unit-Test-tp27520408p27520408.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Simple-RSS-unit-Test-tp27520408p27530798.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to