Hello,
I've been trying writing some tests following the docs in
http://sling.apache.org/documentation/development/sling-testing-tools.html
.
I need to write a test that runs in a sling instance. This test depend
on some content saved in the jcr repository. What is the best way to do
this?
I used the ResourceResolverFactory to obtain a resourceResolver, but I
get null for any resource that I try to get from it.
The test runs with SlingAnnotationsTestRunner.class and I get the
resolver using:
Session session = session.login();
Map<String, Object> param = new HashMap<String, Object>();
param.put("user.jcr.session", session);
ResourceResolver resolver =
this.resolverFactory.getServiceResourceResolver(param);
Thank you and Greetings.
--
*Santiago García Pimentel* | Software Engineer
Netcentric Ibérica SL
Av. Diagonal 123 -8ª
08005 Barcelona
España
Skype: santiago.garciapimentel
[email protected] | www.netcentric.es