You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bprager <be...@prager.ws> on 2015/09/30 19:43:28 UTC
custom Registry in CamelTestSupport
I am trying to unit test a custom registry.
The createRegistry() method which I try to override exist only for
JndiRegistry.
How do I use a custom registry?
Thank you.
--
View this message in context: http://camel.465427.n5.nabble.com/custom-Registry-in-CamelTestSupport-tp5772135.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: custom Registry in CamelTestSupport
Posted by Joakim Bjørnstad <jo...@gmail.com>.
Hello,
To do this, you need to override creation of the CamelContext.
Then you can test with whatever Registry implementation that you want.
public class CustomRegistryTest extends CamelTestSupport {
@Test
public void shouldTest() throws Exception {
}
@Override
protected CamelContext createCamelContext() throws Exception {
return new DefaultCamelContext(createCustomRegistry());
}
private Registry createCustomRegistry() {
return new SimpleRegistry();
}
}
On Wed, Sep 30, 2015 at 7:43 PM, bprager <be...@prager.ws> wrote:
> I am trying to unit test a custom registry.
> The createRegistry() method which I try to override exist only for
> JndiRegistry.
> How do I use a custom registry?
>
> Thank you.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/custom-Registry-in-CamelTestSupport-tp5772135.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Kind regards
Joakim Bjørnstad