use of com.adobe.cq.wcm.core.components.context.MockStyle in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ListImplTest method testChildrenListTypeWithDepth.
@Test
public void testChildrenListTypeWithDepth() throws Exception {
Resource resource = context.currentResource("/content/list/listTypes/childrenListTypeWithDepth");
slingBindings.put(WCMBindings.PROPERTIES, resource.adaptTo(ValueMap.class));
slingBindings.put(WCMBindings.CURRENT_STYLE, new MockStyle(resource));
List list = context.request().adaptTo(List.class);
assertEquals(4, list.getItems().size());
}
use of com.adobe.cq.wcm.core.components.context.MockStyle in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ListImplTest method testOrderDescBy.
@Test
public void testOrderDescBy() throws Exception {
Resource resource = context.currentResource("/content/list/listTypes/staticOrderByTitleDescListType");
slingBindings.put(WCMBindings.PROPERTIES, resource.adaptTo(ValueMap.class));
slingBindings.put(WCMBindings.CURRENT_STYLE, new MockStyle(resource));
List list2 = context.request().adaptTo(List.class);
checkListConsistency(list2, new String[] { "Page 2", "Page 1" });
}
use of com.adobe.cq.wcm.core.components.context.MockStyle in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ListImplTest method testOrderBy.
@Test
public void testOrderBy() throws Exception {
Resource resource = context.currentResource("/content/list/listTypes/staticOrderByTitleListType");
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", "Page 2" });
}
use of com.adobe.cq.wcm.core.components.context.MockStyle 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" });
}
Aggregations