unit test | Community
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.
Best answer by daniel-strmecki

Hello,

 

can you be a little more concrete what is the problem with writting the unit test for this specific method?

Have you tried AEM Mocks? It provides OOTB mocks and makes testing of Sling Models quite simple.

Have a look at https://wcm.io/testing/aem-mock/usage.html#Sling_Models, you can also find links there to AdaptTo presentations.

 

 

Good luck,

Daniel

2 replies

daniel-strmecki
Community Advisor and Adobe Champion
daniel-strmeckiCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
September 18, 2024

Hello,

 

can you be a little more concrete what is the problem with writting the unit test for this specific method?

Have you tried AEM Mocks? It provides OOTB mocks and makes testing of Sling Models quite simple.

Have a look at https://wcm.io/testing/aem-mock/usage.html#Sling_Models, you can also find links there to AdaptTo presentations.

 

 

Good luck,

Daniel

kautuk_sahni
Community Manager
Community Manager
September 25, 2024

@vani1012 Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni