Skip to main content
jerinraj5555
Level 3
January 23, 2023
Solved

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

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.
Himanshu_Singhal
Himanshu_SinghalAccepted 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

2 replies

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

Translate