@Retention(value=RUNTIME) @Target(value={TYPE,METHOD}) @ExtendWith(value={org.apache.sling.junit.jupiter.osgi.BundleParameterResolver.class,org.apache.sling.junit.jupiter.osgi.BundleContextParameterResolver.class,org.apache.sling.junit.jupiter.osgi.ServiceParameterResolver.class}) @Inherited public @interface OSGi
Bundle
, BundleContext
and service instances in conjunction with the
@Service
annotation. The annotation can be used on test classes or on individual
test methods. If used on test classes injection of constructor parameters is supported in addition
to injection of method parameters.
FrameworkUtil.getBundle(Class)
with the test class
in order to gain access to the world of OSGi.Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.