How can I write unit test cases for extended core component models | Community
Skip to main content
jerinraj5555
January 23, 2023
Solved

How can I write unit test cases for extended core component models

  • January 23, 2023
  • 2 replies
  • 1155 views

I have created some sling models by using a delegation pattern(by extending core components) but I've had some issues while writing unit test cases for these sling models.

Hopefully, someone can give me some suggestions. thanks

Thanks

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 Himanshu_Singhal

Hi @jerinraj5555 

Please have a look at the following test case written for class extending core component class.
https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/test/java/com/adobe/cq/wcm/core/components/internal/models/v1/ProgressBarImplTest.java

Thanks,
Himanshu Singhal

2 replies

Jagadeesh_Prakash
Community Advisor
Community Advisor
January 23, 2023
Himanshu_Singhal
Community Advisor
Himanshu_SinghalCommunity AdvisorAccepted solution
Community Advisor
January 23, 2023

Hi @jerinraj5555 

Please have a look at the following test case written for class extending core component class.
https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/test/java/com/adobe/cq/wcm/core/components/internal/models/v1/ProgressBarImplTest.java

Thanks,
Himanshu Singhal