use of com.adobe.cq.wcm.core.components.models.Page in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class PageImplTest method testGetLastModifiedDate.
@Test
public void testGetLastModifiedDate() throws ParseException {
Page page = getPageUnderTest(PAGE);
Calendar calendar = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
calendar.setTime(sdf.parse("2016-01-20T10:33:36.000+0100"));
assertEquals(page.getLastModifiedDate(), calendar);
}
use of com.adobe.cq.wcm.core.components.models.Page in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class PageImplTest method testDesign.
@Test
public void testDesign() {
Page page = getPageUnderTest(PAGE);
assertEquals(DESIGN_PATH, page.getDesignPath());
assertEquals(DESIGN_PATH + "/static.css", page.getStaticDesignPath());
}
use of com.adobe.cq.wcm.core.components.models.Page in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class PageImplTest method testGetClientLibCategories.
@Test
public void testGetClientLibCategories() throws Exception {
Page page = getPageUnderTest(PAGE);
assertEquals("coretest.product-page", page.getClientLibCategories()[0]);
}
use of com.adobe.cq.wcm.core.components.models.Page in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class PageImplTest method testKeywords.
@Test
public void testKeywords() {
Page page = getPageUnderTest(PAGE);
String[] keywordsArray = page.getKeywords();
assertEquals(3, keywordsArray.length);
Set<String> keywords = new HashSet<>(keywordsArray.length);
keywords.addAll(Arrays.asList(keywordsArray));
assertTrue(keywords.contains("one") && keywords.contains("two") && keywords.contains("three"));
}
use of com.adobe.cq.wcm.core.components.models.Page in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class PageImplTest method testGetTemplateName.
@Test
public void testGetTemplateName() throws Exception {
Page page = getPageUnderTest(PAGE);
assertEquals("product-page", page.getTemplateName());
}
Aggregations