Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to write a Junit5 Test case for resource resolver admin user ?

Avatar

Avatar
Ignite 1
Level 1
baw_gov
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile

Avatar
Ignite 1
Level 1
baw_gov
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile
baw_gov
Level 1

24-03-2021

I have a admin user who is trying to get client id from osgi config. How can I write a Mock Junit5 test case for user and client id?

Replies

Avatar

Avatar
Validate 1
Level 6
KiranVedantam1992
Level 6

Likes

150 likes

Total Posts

155 posts

Correct Reply

44 solutions
Top badges earned
Validate 1
Establish
Give Back 3
Give Back
Boost 50
View profile

Avatar
Validate 1
Level 6
KiranVedantam1992
Level 6

Likes

150 likes

Total Posts

155 posts

Correct Reply

44 solutions
Top badges earned
Validate 1
Establish
Give Back 3
Give Back
Boost 50
View profile
KiranVedantam1992
Level 6

25-03-2021

Hi @baw_gov,

 

As per adobe's recommendations, it is not suggested to use the admin user. Please create a system/service user for retrieving the session. More info on system/service user is available here.

 

For mocking the service user, check the similar question here.

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

Avatar

Avatar
Ignite 1
Level 1
baw_gov
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile

Avatar
Ignite 1
Level 1
baw_gov
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile
baw_gov
Level 1

25-03-2021

Hi @KiranVedantam1992 thank you for your reply. I am sorry I meant system user only and this is for Junit5. The link you shared above looks like is for Junit4. Do you have any suggestions for Junit5?