Search in sources :

Example 11 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
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" });
}
Also used : ValueMap(org.apache.sling.api.resource.ValueMap) Resource(org.apache.sling.api.resource.Resource) MockStyle(com.adobe.cq.wcm.core.components.context.MockStyle) List(com.adobe.cq.wcm.core.components.models.List) Test(org.junit.Test)

Aggregations

MockStyle (com.adobe.cq.wcm.core.components.context.MockStyle)11 List (com.adobe.cq.wcm.core.components.models.List)11 Resource (org.apache.sling.api.resource.Resource)11 ValueMap (org.apache.sling.api.resource.ValueMap)11 Test (org.junit.Test)11 Hit (com.day.cq.search.result.Hit)1 SearchResult (com.day.cq.search.result.SearchResult)1