use of com.adobe.cq.wcm.core.components.models.LayoutContainer in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class LayoutContainerImplTest method testContainerWithPropertiesAndLayoutInPolicy.
@Test
public void testContainerWithPropertiesAndLayoutInPolicy() {
context.contentPolicyMapping(LayoutContainerImpl.RESOURCE_TYPE_V1, new HashMap<String, Object>() {
{
put(LayoutContainer.PN_LAYOUT, "responsiveGrid");
}
});
LayoutContainer container = getContainerUnderTest(CONTAINER_2);
// layout set in content policy
assertEquals(LayoutContainer.LayoutType.RESPONSIVE_GRID, container.getLayout(), "Layout type mismatch");
assertEquals("core/wcm/components/container/v1/container", container.getExportedType(), "Exported type mismatch");
Utils.testJSONExport(container, Utils.getTestExporterJSONPath(TEST_BASE, "container2"));
}
use of com.adobe.cq.wcm.core.components.models.LayoutContainer in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class LayoutContainerImplTest method testContainerWithPropertiesAndNoPolicy.
@Test
public void testContainerWithPropertiesAndNoPolicy() {
LayoutContainer container = getContainerUnderTest(CONTAINER_3);
assertEquals("container-d7eba9c61f", container.getId(), "ID mismatch");
assertNull(container.getBackgroundStyle(), "Style");
}
Aggregations