Quinn, Did this finally make some sense. I think I must have inadvertently confused matters and that certainly wasn't my intention.
On Mon, Feb 8, 2016 at 9:44 PM, Brad Johnson <brad.john...@mediadriver.com> wrote: > What I meant was if he is using the actual implementation or the test stub > is the second bundle then he can simply refer to in the test scope. > There's one huge caveat there though. It has to be a pure OSGi service > that does not rely on another CamelContext. PojoSR is not capable of > testing across multiple contexts. My guess is that he has something > associated with a second camel context in the service bundle. So if the > bundle declares a service like: > > <service interface="my.foo.DBConnector"> > <bean class="my.foo.internal.DatabaseConnectorImpl" /> > </service> > > or > > > <service interface="my.foo.DBConnector"> > <bean class="my.foo.internal.TestStubDatabaseConnectorImpl" /> > </service> > > Then that can be used during testing from one bundle to the other and > switched to and from the actual implementation to a test implementation by > changing what the bean class is.. It can use its own blueprint xml, > obviously, it just can't rely on a second camel context. > > Those can be switched. In some cases one can then use this: > > > <service interface="my.foo.DBConnector"> > <bean class="${databaseImplClazz}" /> > </service> > > And change it with configuration. As long as one doesn't get multiple > contexts involved. Hopefully in Camel 3 they will move to a karaf > environment for tests (whether through Pax Exam or something else.) > > When my clients ask what I find weakest in Camel/blueprint I automatically > reply "testing". > > > > 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. >> > >