You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Krystian Panek (JIRA)" <ji...@apache.org> on 2015/06/16 13:38:00 UTC

[jira] [Commented] (SLING-4813) Support OSGi service mocked by e.g Mockito

    [ https://issues.apache.org/jira/browse/SLING-4813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14587901#comment-14587901 ] 

Krystian Panek commented on SLING-4813:
---------------------------------------

https://github.com/apache/sling/pull/97

> Support OSGi service mocked by e.g Mockito
> ------------------------------------------
>
>                 Key: SLING-4813
>                 URL: https://issues.apache.org/jira/browse/SLING-4813
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Krystian Panek
>
> I'd like to use my existing service and mock one of its method (which is calling remote API). But I cannot do that becuase SCR service descriptor cannot be found for CGLIB enhanced class.
> {code}OsgiServiceUtil.injectServices(Mockito.spy(MyServiceImpl()), bundleContext){code}
> It would be great if in further release of mock-osgi such case will be supported. Thanks in advance! I have a hit that may work... I will create a PR in a few seconds for it...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)