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 Details

    • ofClass

      public static <T> OSGiService<T> ofClass(Class<T> clazz)
    • get

      public T get()