Has anyone successfully used
import static com.adobe.cq.wcm.core.components.testing.mock.ContextPlugins.CORE_COMPONENTS;
I have copied all dependencies from https://github.com/wcm-io/io.wcm.maven.aem-dependencies/blob/develop/6.5.13/pom.xml
Above did not work.
I tried having below dependency in pom, core/pom files but somehow could not resolve this dependency at my client machine.
<dependency>
<groupId>io.wcm.maven</groupId>
<artifactId>io.wcm.maven.aem-dependencies</artifactId>
<version>6.5.13.0000</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Still could not get above import working in my junit.
Thanks,
Sri
Views
Replies
Total Likes
Hi,
To use the import statement import static com.adobe.cq.wcm.core.components.testing.mock.ContextPlugins.CORE_COMPONENTS; successfully, follow these steps:
<dependency>
<groupId>io.wcm.testing</groupId>
<artifactId>aem-mock</artifactId>
<version>1.11.0</version>
<scope>test</scope>
</dependency>
import io.wcm.testing.mock.aem.junit.AemContext;
public class MyTest {
@Rule
public final AemContext context = new AemContext();
// Your test methods here
}
@sreenu539 solution provided by @ManviSharma should work.. please try and let us know if you still need our help.
I am specifically looking to cover "super typed core teaser" as part of junit.