Expand my Community achievements bar.

SOLVED

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

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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/w...

Thanks,
Himanshu Singhal

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

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/w...

Thanks,
Himanshu Singhal