public final class SlingContext extends SlingContextImpl implements org.junit.rules.TestRule
SlingContextBuilder alternatively to the constructors on this class - it offers
more options and fine-grained control about setting up the test context.contentBuilder, contentLoader, request, resourceResolver, resourceResolverFactory, resourceResolverType, response, slingScriptHelper, uniqueRoot| Constructor and Description |
|---|
SlingContext()
Initialize Sling context with default resource resolver type:
MockSling.DEFAULT_RESOURCERESOLVER_TYPE. |
SlingContext(ResourceResolverType resourceResolverType)
Initialize Sling context with resource resolver type.
|
SlingContext(SlingContextCallback afterSetUpCallback)
Initialize Sling context with default resource resolver type:
MockSling.DEFAULT_RESOURCERESOLVER_TYPE. |
SlingContext(SlingContextCallback afterSetUpCallback,
ResourceResolverType resourceResolverType)
Initialize Sling context with resource resolver type.
|
SlingContext(SlingContextCallback afterSetUpCallback,
SlingContextCallback beforeTearDownCallback)
Initialize Sling context with default resource resolver type:
MockSling.DEFAULT_RESOURCERESOLVER_TYPE. |
SlingContext(SlingContextCallback afterSetUpCallback,
SlingContextCallback beforeTearDownCallback,
ResourceResolverType resourceResolverType)
Initialize Sling context with resource resolver type.
|
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
addModelsForPackage, create, currentResource, currentResource, currentResource, load, newResourceResolverFactory, registerAdapter, registerAdapter, registerDefaultServices, request, requestPathInfo, resourceResolver, resourceResolverType, response, runMode, setResourceResolverFactoryActivatorProps, setResourceResolverType, setUp, slingScriptHelper, tearDown, uniqueRootpublic SlingContext()
MockSling.DEFAULT_RESOURCERESOLVER_TYPE.public SlingContext(ResourceResolverType resourceResolverType)
resourceResolverType - Resource resolver type.public SlingContext(SlingContextCallback afterSetUpCallback)
MockSling.DEFAULT_RESOURCERESOLVER_TYPE.afterSetUpCallback - Allows the application to register an own callback function that is called after the built-in setup rules are executed.public SlingContext(SlingContextCallback afterSetUpCallback, ResourceResolverType resourceResolverType)
afterSetUpCallback - Allows the application to register an own callback function that is called after the built-in setup rules are executed.resourceResolverType - Resource resolver type.public SlingContext(SlingContextCallback afterSetUpCallback, SlingContextCallback beforeTearDownCallback)
MockSling.DEFAULT_RESOURCERESOLVER_TYPE.afterSetUpCallback - Allows the application to register an own callback function that is called after the built-in setup rules are executed.beforeTearDownCallback - Allows the application to register an own callback function that is called before the built-in teardown rules are executed.public SlingContext(SlingContextCallback afterSetUpCallback, SlingContextCallback beforeTearDownCallback, ResourceResolverType resourceResolverType)
afterSetUpCallback - Allows the application to register an own callback function that is called after the built-in setup rules are executed.beforeTearDownCallback - Allows the application to register an own callback function that is called before the built-in teardown rules are executed.resourceResolverType - Resource resolver type.Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.