I wish there was a way to see your code.  But if you are exporting the
service from the firs bundle AND it doesn't use a CamelContextRoute in that
bundle, then you shouldn't need to invoke the asService method at all.  The
<test> scope will pick up your second bundle and register the service
automatically.

If you make a copy of your service provider bundle and just put a test stub
inside it with a blueprint statement that exposes that interface and put a
reference to that bundle in your consumer the test will automatically pick
it up and register it.  Unfortunately if that second bundle relies on
CamelContexts and routes this will not work.  So it is really only useful
for creating test stubs.

As Quinn pointed out if you create an API bundle and perhaps a models
bundle that the other two projects depend on then they are decoupled.  A
test stub bundle would depend on the API, have a test implementation and
then be exposed via its service interface.

I could probably work this up as a project easier to demonstrate but i
don't know if there's a way to do attachments.


On Mon, Feb 8, 2016 at 1:37 PM, enigma <send2she...@gmail.com> wrote:

> @Ranx - With reference to your statement - " If the first bundle is in his
> POM with a scope of
> test then it should be available during testing. ".
>
> Are you saying that it is possible to invoke the asService method *without
> *the the Stub Implementation and the OSGI can invoke the actual
> implementation?
>
> If that is the case, then I have tried it that approach and was NOT
> successful. Not sure, if I am missing something here.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/CamelBlueprintTestSupport-No-bean-could-be-found-in-the-registry-tp5777228p5777405.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to