Hi Roy,
On Tue, 2016-12-20 at 23:03 +0100, Roy Teeuwen wrote:
> Hey all,
>
> I am trying to use the osgi mocks in the following setup:
> @Component
> @Designate(ocd = ServiceImpl.Config.class)
> public class ServiceImpl implements Service {
>
> @ObjectClassDefinition
> @interface Config {
>
> String property() default "value";
> }
>
> private Config config;
>
> @Activate
> public void activate(Config config) {
> this.config = config;
> }
> }
> Test class:
> service = context.registerInjectActivateService(new ServiceImpl(),
> "property", "some-value");
> But I am getting the following exception:
>
> java.lang.RuntimeException: No matching activation method with name
> 'activate' found in class some.packagename.ServiceImpl
(snip)
Support for annotation classes as configuration was added with
https://issues.apache.org/jira/browse/SLING-5327
which is part of OSGi Mocks 2.0.0 . What version are you using?
Robert