Re: Mock Osgi Services via Sling Mocks

2018-09-03 Thread Dominik Süß
Hi Stefan, you're right I just thought too complicated trying to register via SCR. The snippet below seems to work just fine: @Spy PackageRegistry registry = new FSPackageRegistry(); [...] BundleContext bundleContext = MockOsgi.newBundleContext();

RE: Mock Osgi Services via Sling Mocks

2018-09-03 Thread Stefan Seifert
hello dominik. do you have a small example project to show the problem? from what you describe this should be no problem with osgi mocks/sling mocks - but i do not get the exact problem you encounter. if you want to mock an OSGi services it's easiest to use somehing like mockito and register