Skip to main content
New Participant
May 9, 2022

Facing issue while mocking CurrentNode

  • May 9, 2022
  • 2 replies
  • 1516 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

joerghoh
Employee
May 11, 2022

Do you use the Sling Testing Framework?

New Participant
May 27, 2022

a

arunpatidar
New Participant
May 9, 2022

Hi,

You can inject resourecResolver and adapt to Node

resourceRsolver.adaptTo(Node.class)
Arun Patidar
New Participant
May 9, 2022

How can I inject resourceResolver in test class?

arunpatidar
New Participant
May 9, 2022
Arun Patidar