Package com.adobe.acs.commons.genericlists

Examples of com.adobe.acs.commons.genericlists.GenericList


        adapterFactory = new GenericListAdapterFactory();
    }

    @Test
    public void test_that_adapting_page_with_correct_template_returns_directly() {
        GenericList list = adapterFactory.getAdapter(listPage, GenericList.class);
        assertNotNull(list);
        List<Item> items = list.getItems();
        assertNotNull(items);
        assertEquals(2, items.size());
        assertEquals("titleone", items.get(0).getTitle());
        assertEquals("valueone", items.get(0).getValue());
    }
View Full Code Here


                    }
                });
            }
        });

        GenericList section = adaptToGenericList(wrongPage);
        assertNull(section);
    }
View Full Code Here

            public ValueMap answer(InvocationOnMock invocation) throws Throwable {
                return new ValueMapDecorator(new HashMap<String, Object>());
            }
        });

        GenericList section = adaptToGenericList(wrongPage);
        assertNull(section);
    }
View Full Code Here

    public void test_i18n_titles() {
        Locale french = new Locale("fr");
        Locale swissFrench = new Locale("fr", "ch");
        Locale franceFrench = new Locale("fr", "fr");
       
        GenericList list = adapterFactory.getAdapter(listPage, GenericList.class);
        assertNotNull(list);
        List<Item> items = list.getItems();
        assertNotNull(items);
        assertEquals(2, items.size());
        assertEquals("titleone", items.get(0).getTitle(french));
        assertEquals("titleone", items.get(0).getTitle(swissFrench));
        assertEquals("titleone", items.get(0).getTitle(franceFrench));
View Full Code Here

            String fullListPath = LIST_ROOT + listPath;
            Page listPage = resourceResolver.adaptTo(PageManager.class).getPage(fullListPath);
            if (listPage == null) {
                return null;
            } else {
                GenericList list = listPage.adaptTo(GenericList.class);
                if (list == null) {
                    return null;
                } else {
                    ResourceMetadata rm = new ResourceMetadata();
                    rm.setResolutionPath(path);
View Full Code Here

TOP

Related Classes of com.adobe.acs.commons.genericlists.GenericList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.