use of com.adobe.cq.wcm.core.components.models.LanguageNavigationItem in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class LanguageNavigationImplTest method verifyLanguageNavigationItems.
protected void verifyLanguageNavigationItems(Object[][] expectedPages, List<NavigationItem> items) {
assertEquals(expectedPages.length, items.size(), "The language navigation items contain a different number of pages than expected.");
int index = 0;
while (items.size() > index) {
LanguageNavigationItem item = (LanguageNavigationItem) items.get(index);
assertEquals(expectedPages[index][0], item.getPath(), "The language navigation items don't seem to have the correct order.");
assertEquals(expectedPages[index][1], item.getTitle(), "The language navigation item's title is not what was expected: " + item.getPath());
assertEquals(expectedPages[index][2], item.isActive(), "The language navigation item's active state is not what was expected: " + item.getPath());
assertEquals(expectedPages[index][3], item.getLevel(), "The language navigation item's level is not what was expected: " + item.getPath());
assertEquals(expectedPages[index][4], item.getCountry(), "The language navigation item's country is not what was expected: " + item.getPath());
assertEquals(expectedPages[index][5], item.getLanguage(), "The language navigation item's language is not what was expected: " + item.getPath());
assertEquals(expectedPages[index][5], item.getLocale().toString().replace('_', '-'), "The language navigation item's locale is not what was expected: " + item.getPath());
assertEquals(CONTEXT_PATH + expectedPages[index][6], item.getURL(), "The language navigation item's URL is not what was expected: " + item.getPath());
verifyLanguageNavigationItem(expectedPages[index], item);
index++;
}
}
Aggregations