Search in sources :

Example 31 with List

use of com.adobe.cq.wcm.core.components.models.List in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class ListImplTest method testProperties.

@Test
@Override
protected void testProperties() {
    List list = getListUnderTest(LIST_1);
    assertTrue(list.showDescription());
    assertTrue(list.showModificationDate());
    assertTrue(list.linkItems());
    assertTrue(list.linkItems());
    assertEquals(2, list.getListItems().size());
    Utils.testJSONExport(list, Utils.getTestExporterJSONPath(testBase, LIST_1));
}
Also used : List(com.adobe.cq.wcm.core.components.models.List) Test(org.junit.jupiter.api.Test)

Example 32 with List

use of com.adobe.cq.wcm.core.components.models.List in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class ListImplTest method testStaticWithVanityPaths.

@Test
public void testStaticWithVanityPaths() {
    List list = getListUnderTest(LIST_2);
    checkListConsistencyByLinkURL(list, new String[] { "/context/page_3.html", "/context/4_page.html" });
    Utils.testJSONExport(list, Utils.getTestExporterJSONPath(TEST_BASE, LIST_2));
}
Also used : List(com.adobe.cq.wcm.core.components.models.List) Test(org.junit.jupiter.api.Test)

Aggregations

List (com.adobe.cq.wcm.core.components.models.List)32 Test (org.junit.jupiter.api.Test)20 Resource (org.apache.sling.api.resource.Resource)13 ValueMap (org.apache.sling.api.resource.ValueMap)13 MockStyle (com.adobe.cq.wcm.core.components.context.MockStyle)11 Test (org.junit.Test)11 SearchResult (com.day.cq.search.result.SearchResult)3 SimpleSearch (com.day.cq.search.SimpleSearch)2 ComponentExporter (com.adobe.cq.export.json.ComponentExporter)1 ExporterConstants (com.adobe.cq.export.json.ExporterConstants)1 ListItem (com.adobe.cq.wcm.core.components.models.ListItem)1 AbstractComponentImpl (com.adobe.cq.wcm.core.components.util.AbstractComponentImpl)1 Predicate (com.day.cq.search.Predicate)1 Hit (com.day.cq.search.result.Hit)1 TagManager (com.day.cq.tagging.TagManager)1 NameConstants (com.day.cq.wcm.api.NameConstants)1 Page (com.day.cq.wcm.api.Page)1 Style (com.day.cq.wcm.api.designer.Style)1 JsonProperty (com.fasterxml.jackson.annotation.JsonProperty)1 Serializable (java.io.Serializable)1