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

kautuk_sahni
Employee
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
daniel-strmecki
daniel-strmeckiAccepted solution
New Participant
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