Importing OOTB Test class in Custom Test Class | Community
Skip to main content
Anmol_Bhardwaj
Community Advisor
Community Advisor
June 9, 2022
Solved

Importing OOTB Test class in Custom Test Class

  • June 9, 2022
  • 1 reply
  • 797 views

I have overlayed an OOTB core component. I have modified & added some fields to it. I was able to create a SLING Modal for the same through delegation and only wrote Injectors & getters for the custom fields I added.

Now I want to acheve the same in Unit test classes.

Although, I am able to import com.adobe.cq.wcm.core.components.internal.models.v1.ButtonImpl, 

I am not able to import com.adobe.cq.wcm.core.components.internal.models.v1.ButtonImplTest. 

 

Is there anything that I'm missing here?

 

I want to achieve something similar like ButtonImplTest(v2), where it has extended v1 test class in the WCM Core components code.

https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/test/java/com/adobe/cq/wcm/core/components/internal/models/v2/ButtonImplTest.java 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
June 9, 2022
Anmol_Bhardwaj
Community Advisor
Community Advisor
June 9, 2022

Thanks @arunpatidar,

I will try this and update in this thread.