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
public void testMaxItems() throws Exception {
Resource resource = context.currentResource("/content/list/listTypes/staticMaxItemsListType");
slingBindings.put(WCMBindings.PROPERTIES, resource.adaptTo(ValueMap.class));
slingBindings.put(WCMBindings.CURRENT_STYLE, new MockStyle(resource));
List list = context.request().adaptTo(List.class);
checkListConsistency(list, new String[] { "Page 1" });
}
use of com.adobe.cq.wcm.core.components.models.List in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ListImplTest method testOrderByModificationDateDesc.
@Test
protected void testOrderByModificationDateDesc() {
List list = getListUnderTest(LIST_10);
checkListConsistencyByTitle(list, new String[] { "Page 1", "Page 2" });
Utils.testJSONExport(list, Utils.getTestExporterJSONPath(testBase, LIST_10));
}
use of com.adobe.cq.wcm.core.components.models.List in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ListImplTest method testTagsListType.
@Test
protected void testTagsListType() {
List list = getListUnderTest(LIST_5);
checkListConsistencyByPaths(list, new String[] { "/content/list/pages/page_1/page_1_3" });
Utils.testJSONExport(list, Utils.getTestExporterJSONPath(testBase, LIST_5));
}
use of com.adobe.cq.wcm.core.components.models.List in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ListImplTest method testOrderByTitleWithNoTitleForOneItem.
@Test
protected void testOrderByTitleWithNoTitleForOneItem() {
List list = getListUnderTest(LIST_15);
checkListConsistencyByPaths(list, new String[] { "/content/list/pages/page_4", "/content/list/pages/page_1", "/content/list/pages/page_2" });
}
use of com.adobe.cq.wcm.core.components.models.List in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ListImplTest method testOrderByModificationDateWithNoModificationDateForOneItem.
@Test
protected void testOrderByModificationDateWithNoModificationDateForOneItem() {
List list = getListUnderTest(LIST_13);
checkListConsistencyByTitle(list, new String[] { "Page 2", "Page 1", "Page 1.2" });
}
Aggregations