Class AemContext

java.lang.Object
org.apache.sling.testing.mock.osgi.context.OsgiContextImpl
org.apache.sling.testing.mock.sling.context.SlingContextImpl
io.wcm.testing.mock.aem.context.AemContextImpl
io.wcm.testing.mock.aem.junit5.AemContext
Direct Known Subclasses:
JcrMockAemContext, JcrOakAemContext, NoResourceResolverTypeAemContext, ResourceResolverMockAemContext

@ConsumerType public class AemContext extends AemContextImpl
AEM Mock parameter object with resource resolver type defaulting to ResourceResolverType.RESOURCERESOLVER_MOCK.

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

For convenience a set of subclasses already exist to use different resource resolver types.

See Also:
  • Constructor Details

    • AemContext

      public AemContext()
      Initialize AEM context.
    • AemContext

      public AemContext(@NotNull @NotNull org.apache.sling.testing.mock.sling.ResourceResolverType resourceResolverType)
      Initialize AEM context.
      Parameters:
      resourceResolverType - Resource resolver type.
  • Method Details

    • setUpContext

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

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