Honwai Wong created SLING-4111:
----------------------------------
Summary: SlingContext: default resourceresolver type not available
Key: SLING-4111
URL: https://issues.apache.org/jira/browse/SLING-4111
Project: Sling
Issue Type: Improvement
Components: Testing
Affects Versions: Testing Sling Mock 1.0.0
Reporter: Honwai Wong
Priority: Minor
According to the Sling Mocks
[documentation|http://sling.apache.org/documentation/development/sling-mock.html#resource-resolver-types],
the {{RESOURCERESOLVER_MOCK}} resource resolver type is supposed to be the
default. However, initializing the {{SlingContext}} test rule without any
arguments, a RuntimeException is thrown:
{code}
java.lang.RuntimeException: Unable to initialize null resource resolver factory.
at
org.apache.sling.testing.mock.sling.context.ContextResourceResolverFactory.get(ContextResourceResolverFactory.java:60)
at
org.apache.sling.testing.mock.sling.context.SlingContextImpl.newResourceResolverFactory(SlingContextImpl.java:109)
at
org.apache.sling.testing.mock.sling.context.SlingContextImpl.setUp(SlingContextImpl.java:101)
at
org.apache.sling.testing.mock.sling.junit.SlingContext.access$000(SlingContext.java:32)
at
org.apache.sling.testing.mock.sling.junit.SlingContext$1.before(SlingContext.java:170)
{code}
Attaching a patch which sets above resource resolver type as default.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)