For the below code I am unable to write the JUnit for @Postconstruct init()
But for text JUNIT is working fine via JSON. Need help
@inject
private Page currentPage;
@ValueMapValue
Private String text;
private String pageTitle;
@PostConstruct
protected void init() {
if(!(currentPage.getName().equalsIgnoreCase("Product") || currentPage.getTemplate.getPath.equals("/conf/we-retail/settings/wcm/templates/hero")))
{
text="";
}
}
public void getText()
{ return text;}
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
you don't need to write the junit for initi method. Amke sure you create 2 json one with your template and another with different template to make code coverage 100%
example
Hi @Ronnie09
Please follow the steps in the below URL: https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-wknd-tutorial-devel...
Hope this helps.
Thanks,
Kiran Vedantam.
Hi,
you don't need to write the junit for initi method. Amke sure you create 2 json one with your template and another with different template to make code coverage 100%
example
Views
Likes
Replies
Views
Likes
Replies