![]() ![]() Please use this thread to ask the related questions. If true or absent, the placeholder text is. Resources: These define static elements used by the component. The following table lists the elements available with this annotation. Read Full Blog Getting started with Junit Code coverage in AEM using Mockito Framework Q&A AEM standard components are defined as cq:Component and have the key elements: jcr properties: A list of jcr properties these are variable and some may be optional though the basic structure of a component node, its properties and subnodes are defined by the cq:Component definition. Public class Accordion String String String description īelow is my Test class where I am using before and test method to set some values to my Java class and then later testing out the values that I set earlier. ![]() * Nikhil = Resource.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL) So below is my Accordion Java Sling Model class. Now once we are done adding the maven dependency, lets have a Java class for our article. So, lets go ahead and add the below dependency to our POM.xml ![]() So to cover the code using Junit test cases we will use Mockito framework. As this is the first article which will just cover the basics, if required I can go ahead and publish more article on in-depth knowledge on Junit. Getting started with Junit Code coverage in AEM using Mockito Framework by aemsimplifiedbynikhil Abstract Welcome back AEM folks! In this article we will look into the process by which we can write junit test cases for the code coverage for our Java code in AEM. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |