Search in sources :

Example 11 with DataSource

use of com.adobe.granite.ui.components.ds.DataSource in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class ElementsDataSourceServletTest method testFragmentPathNonExisting.

@Test
void testFragmentPathNonExisting() throws ServletException, IOException {
    DataSource dataSource = getDataSource(servlet, DS_FRAGMENT_PATH_NON_EXISTING);
    assertDataSource(dataSource, new String[0], new String[0]);
}
Also used : DataSource(com.adobe.granite.ui.components.ds.DataSource) Test(org.junit.jupiter.api.Test)

Example 12 with DataSource

use of com.adobe.granite.ui.components.ds.DataSource in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class ElementsDataSourceServletTest method testComponentPathTextOnly.

@Test
void testComponentPathTextOnly() throws ServletException, IOException {
    DataSource dataSource = getDataSource(servlet, DS_COMPONENT_PATH_TEXT_ONLY);
    assertDataSource(dataSource, ELEMENT_NAMES, ELEMENT_TITLES);
}
Also used : DataSource(com.adobe.granite.ui.components.ds.DataSource) Test(org.junit.jupiter.api.Test)

Example 13 with DataSource

use of com.adobe.granite.ui.components.ds.DataSource in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class ElementsDataSourceServletTest method testFragmentPathStructured.

@Test
void testFragmentPathStructured() throws ServletException, IOException {
    DataSource dataSource = getDataSource(servlet, DS_FRAGMENT_PATH_STRUCTURED);
    assertDataSource(dataSource, ELEMENT_NAMES, ELEMENT_TITLES);
}
Also used : DataSource(com.adobe.granite.ui.components.ds.DataSource) Test(org.junit.jupiter.api.Test)

Example 14 with DataSource

use of com.adobe.granite.ui.components.ds.DataSource in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class ElementsDataSourceServletTest method testNoConfig.

@Test
void testNoConfig() throws ServletException, IOException {
    DataSource dataSource = getDataSource(servlet, DS_NO_CONFIG);
    assertDataSource(dataSource, new String[0], new String[0]);
}
Also used : DataSource(com.adobe.granite.ui.components.ds.DataSource) Test(org.junit.jupiter.api.Test)

Example 15 with DataSource

use of com.adobe.granite.ui.components.ds.DataSource in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class ElementsDataSourceServletTest method testComponentPathNonExisting.

@Test
void testComponentPathNonExisting() throws ServletException, IOException {
    DataSource dataSource = getDataSource(servlet, DS_COMPONENT_PATH__NON_EXISTING);
    assertDataSource(dataSource, new String[0], new String[0]);
}
Also used : DataSource(com.adobe.granite.ui.components.ds.DataSource) Test(org.junit.jupiter.api.Test)

Aggregations

DataSource (com.adobe.granite.ui.components.ds.DataSource)48 Test (org.junit.jupiter.api.Test)37 Resource (org.apache.sling.api.resource.Resource)14 SimpleDataSource (com.adobe.granite.ui.components.ds.SimpleDataSource)10 ValueMap (org.apache.sling.api.resource.ValueMap)6 EmptyDataSource (com.adobe.granite.ui.components.ds.EmptyDataSource)5 ResourceResolver (org.apache.sling.api.resource.ResourceResolver)5 LinkedList (java.util.LinkedList)3 ValueMapResource (com.adobe.granite.ui.components.ds.ValueMapResource)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Test (org.junit.Test)2 DataSourceOption (com.adobe.acs.commons.wcm.datasources.DataSourceOption)1 ContentFragment (com.adobe.cq.dam.cfm.ContentFragment)1 CoreComponentTestContext (com.adobe.cq.wcm.core.components.context.CoreComponentTestContext)1 TextValueDataResourceSource (com.adobe.cq.wcm.core.components.internal.servlets.TextValueDataResourceSource)1 EmbeddableDescription (com.adobe.cq.wcm.core.components.internal.servlets.embed.EmbeddablesDataSourceServlet.EmbeddableDescription)1 MockStyle (com.adobe.cq.wcm.core.components.testing.MockStyle)1 Config (com.adobe.granite.ui.components.Config)1 Value (com.adobe.granite.ui.components.Value)1