Search in sources :

Example 1 with Container

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

the class AbstractContainerImplTest method testEmptyContainer.

@Test
public void testEmptyContainer() {
    Container container = new ContainerImpl();
    List<ListItem> items = container.getItems();
    assertEquals(0, items.size());
}
Also used : LayoutContainer(com.adobe.cq.wcm.core.components.models.LayoutContainer) Container(com.adobe.cq.wcm.core.components.models.Container) ListItem(com.adobe.cq.wcm.core.components.models.ListItem) Test(org.junit.jupiter.api.Test)

Example 2 with Container

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

the class AbstractContainerImplTest method testContainerWithItems.

@Test
public void testContainerWithItems() {
    Container container = getContainerUnderTest(CONTAINER_1);
    Object[][] expectedItems = { { "Teaser 1 description", "item_1", "/content/container/jcr:content/root/responsivegrid/container-1/item_1", "Teaser 1" }, { "Teaser 2 description", "item_2", "/content/container/jcr:content/root/responsivegrid/container-1/item_2", "Teaser 2" } };
    verifyContainerItems(expectedItems, container.getItems());
}
Also used : LayoutContainer(com.adobe.cq.wcm.core.components.models.LayoutContainer) Container(com.adobe.cq.wcm.core.components.models.Container) Test(org.junit.jupiter.api.Test)

Aggregations

Container (com.adobe.cq.wcm.core.components.models.Container)2 LayoutContainer (com.adobe.cq.wcm.core.components.models.LayoutContainer)2 Test (org.junit.jupiter.api.Test)2 ListItem (com.adobe.cq.wcm.core.components.models.ListItem)1