The route is defined in blueprint and I’m running the test using 
CamelBlueprintTestSupport - does that make a difference?


> On Mar 10, 2016, at 8:04 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:
> 
> Hi
> 
> Ah that test component is never really used. So the idea is that you
> have a file in that directory, that has the value "My Value" which the
> test component will load and compare agains the incoming message.
> 
> But yeah seems like the file -> string conversion somehow fails. You
> just run this from straing junit ? No karaf or blueprint or osgi
> container?
> 
> On Thu, Mar 10, 2016 at 4:01 PM, Quinn Stevenson
> <qu...@pronoia-solutions.com> wrote:
>> I’m trying to get the sample from the documentation for the Test Component 
>> working ( http://camel.apache.org/test.html 
>> <http://camel.apache.org/test.html> ), but I keep getting a type conversion 
>> error.
>> 
>> Here’s the route definition:
>> <route id="direct-to-test">
>>    <from uri="direct://source"/>
>>    <to uri="test:file://data?noop=true" />
>> </route>
>> 
>> Here’s the test method:
>> @Test
>> public void testRoute() throws Exception {
>>    template.sendBody( "direct://source", "My Value");
>> 
>>    assertMockEndpointsSatisfied();
>> }
>> 
>> Here’s the error:
>> java.lang.AssertionError: test://file://data?noop=true There is no type 
>> conversion possible from java.lang.String to 
>> org.apache.camel.component.file.GenericFile
>> 
>> I can see that Camel is finding the file with the test data because I’m 
>> getting a .camelLock file, but I can’t seem to figure out what I’m doing 
>> wrong
>> 
>> 
>> 
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to