Facing issue while mocking CurrentNode | Community
Skip to main content
Level 2
May 9, 2022

Facing issue while mocking CurrentNode

  • May 9, 2022
  • 2 replies
  • 1517 views

How to mock:

@586265
@3200416("script-bindings")
Node currentNode;

 

Not able to do through slingBindings as well as through session.

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

2 replies

arunpatidar
Community Advisor
Community Advisor
May 9, 2022

Hi,

You can inject resourecResolver and adapt to Node

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

How can I inject resourceResolver in test class?

arunpatidar
Community Advisor
Community Advisor
May 9, 2022
Arun Patidar
joerghoh
Adobe Employee
Adobe Employee
May 11, 2022

Do you use the Sling Testing Framework?

May 27, 2022

a