Expand my Community achievements bar.

SOLVED

AEM Sites WKND Tutorials - Unit Testing

Avatar

Level 3

Hi all,

 

I am following AEM Sites WKND Tutorials - Unit Testing. https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-wknd-tutorial-de...

 

It says:
"Unit tests typically map 1-to-1 with Java™ classes. In this chapter, we’ll write a JUnit test for the BylineImpl.java, which is the Sling Model backing the Byline component."

 

But the Sling Model backing the Byline component was Byline.java.

https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-wknd-tutorial-de...

 

Also Byline.java was created in folder core/src/main/java/com/adobe/aem/guides/wknd/core/models, but 

BylineImpl.java shows src/main/java/com/adobe/aem/guides/wknd/core/models/impl folder.

 

Now, I can not use Byline.java created earlier in the parent folder of thee expected folder in this exercise.

 

Please suggest.

 

Appreciate your replies.

 

Thanks,

RK.

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Rama_KrishnaNy 

 

ByLineImpl.java is the implementation class for Byline.java

If you cover the unit test case for BylineImpl.java, it will cover the test case for Byline.java

 

Hope this helps

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Rama_KrishnaNy 

 

ByLineImpl.java is the implementation class for Byline.java

If you cover the unit test case for BylineImpl.java, it will cover the test case for Byline.java

 

Hope this helps