camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to mock rabbitmq endpoints?
Date Thu, 19 Jun 2014 08:54:49 GMT
@EndpointInject does not support wildcards. So you would need to
specify the url 100%

On Thu, Jun 19, 2014 at 10:50 AM, Willem Jiang <willem.jiang@gmail.com> wrote:
> The last one should be OK.
> How did you define the @MockEndpoints?
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
> On June 18, 2014 at 4:27:36 PM, ozzyoli (ozzyoli@gmail.com) wrote:
>> I'm working on my testing my CamelContext Routes.
>>
>> I am using a SpringJunit4ClassRunner to run my tests and start my
>> CamelContext (defined in Spring XML).
>> I have the*@MockEndpoints* annotation set at the class-level.
>>
>> How do I reference the mocked equivalents of my RabbitMQ endpoints?
>>
>> For instance given this RabbitMQ endpoint
>>
>> rabbitmq://localhost:5672/test?autoDelete=false&password=xxxxxx&routingKey=ipm.adapter&username=guest&vhost=%2F
>>
>> How do I get hold of the mocked version of that mocked endpoint?
>>
>> @EndpointInject(uri="mock:rabbitmq")
>>
>> OR
>>
>> @EndpointInject(uri="mock:rabbitmq://localhost:5672")
>>
>> OR
>>
>> @EndpointInject(uri="mock:rabbitmq://localhost:5672/test?autoDelete=false&password=xxxxxx&routingKey=ipm.adapter&username=guest&vhost=%2F")
>>
>> OR
>>
>> Something else altogether? (I'll admit I havent had much luck with any of
>> them so far)
>>
>>
>> Many thanks in advance,
>> Oli
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/How-to-mock-rabbitmq-endpoints-tp5752492.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message