Search in sources :

Example 16 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 testMaxItems.

@Test
protected void testMaxItems() {
    List list = getListUnderTest(LIST_11);
    checkListConsistencyByTitle(list, new String[] { "Page 1" });
    Utils.testJSONExport(list, Utils.getTestExporterJSONPath(testBase, LIST_11));
}
Also used : List(com.adobe.cq.wcm.core.components.models.List) Test(org.junit.jupiter.api.Test)

Example 17 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 testChildrenListType.

@Test
protected void testChildrenListType() {
    List list = getListUnderTest(LIST_3);
    checkListConsistencyByPaths(list, new String[] { "/content/list/pages/page_1/page_1_1", "/content/list/pages/page_1/page_1_2", "/content/list/pages/page_1/page_1_3" });
    Utils.testJSONExport(list, Utils.getTestExporterJSONPath(testBase, LIST_3));
}
Also used : List(com.adobe.cq.wcm.core.components.models.List) Test(org.junit.jupiter.api.Test)

Example 18 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 testOrderByModificationDateWithNoModificationDate.

@Test
protected void testOrderByModificationDateWithNoModificationDate() {
    List list = getListUnderTest(LIST_12);
    checkListConsistencyByTitle(list, new String[] { "Page 1.1", "Page 1.2" });
}
Also used : List(com.adobe.cq.wcm.core.components.models.List) Test(org.junit.jupiter.api.Test)

Example 19 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 testOrderByTitleWithAccent.

@Test
public void testOrderByTitleWithAccent() {
    List list = getListUnderTest(LIST_16);
    checkListConsistencyByPaths(list, new String[] { "/content/list/pages/page_1", "/content/list/pages/page_5", "/content/list/pages/page_2" });
}
Also used : List(com.adobe.cq.wcm.core.components.models.List) Test(org.junit.jupiter.api.Test)

Example 20 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
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(TEST_BASE, LIST_1));
}
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