Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

7 replies

arunpatidar
Community Advisor
Community Advisor
May 9, 2022

Hi,

You can inject resourecResolver and adapt to Node

resourceRsolver.adaptTo(Node.class)
Translate
Arun Patidar
Level 2
May 9, 2022

How can I inject resourceResolver in test class?

Translate
arunpatidar
Community Advisor
Community Advisor
May 9, 2022

Hi,

You can get it from context

ResourceResolver rr = context.resourceResolver()

 

https://github.com/arunpatidar02/com.aemlab.junitapp/blob/master/core/src/test/java/com/aemlab/junit/core/models/DownloadTest.java

 

Translate
Arun Patidar
joerghoh
Adobe Employee
Adobe Employee
May 11, 2022

Do you use the Sling Testing Framework?

Translate
May 27, 2022

a

Translate