Class OsgiContext

java.lang.Object
org.apache.sling.testing.mock.osgi.context.OsgiContextImpl
org.apache.sling.testing.mock.osgi.junit5.OsgiContext

@ConsumerType public final class OsgiContext extends org.apache.sling.testing.mock.osgi.context.OsgiContextImpl
OSGi Mock parameter object.

Additionally you can subclass this class and provide further parameters via OsgiContextBuilder.

  • Field Summary

    Fields inherited from class org.apache.sling.testing.mock.osgi.context.OsgiContextImpl

    componentContext
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initialize OSGi context.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    This is called by OsgiContextExtension to set up context.
    protected void
    This is called by OsgiContextExtension to tear down context.

    Methods inherited from class org.apache.sling.testing.mock.osgi.context.OsgiContextImpl

    bundleContext, componentContext, getService, getServices, registerInjectActivateService, registerInjectActivateService, registerInjectActivateService, registerInjectActivateService, registerInjectActivateService, registerInjectActivateService, registerService, registerService, registerService, registerService, setUp, tearDown

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OsgiContext

      public OsgiContext()
      Initialize OSGi context.
  • Method Details

    • setUpContext

      protected void setUpContext()
      This is called by OsgiContextExtension to set up context.
    • tearDownContext

      protected void tearDownContext()
      This is called by OsgiContextExtension to tear down context.