Package org.apache.sling.junit.rules
Class OSGiService<T>
- java.lang.Object
-
- org.apache.sling.junit.rules.Service
-
- org.apache.sling.junit.rules.OSGiService<T>
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class OSGiService<T> extends Service
Improved variant of the Service class that uses generics. The {#link TeleporterRule} also provides access to OSGi services for server-side tests, in a more integrated way.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description T
get()
static <T> OSGiService<T>
ofClass(java.lang.Class<T> clazz)
-
Methods inherited from class org.apache.sling.junit.rules.Service
apply, getService
-
-
-
-
Method Detail
-
ofClass
public static <T> OSGiService<T> ofClass(java.lang.Class<T> clazz)
-
get
public T get()
-
-