Search in sources :

Example 21 with DefinitionRegistry

use of org.talend.components.api.service.common.DefinitionRegistry in project components by Talend.

the class AzureStorageGenericBase method getComponentService.

public ComponentService getComponentService() {
    // return compServ;
    if (componentService == null) {
        DefinitionRegistry testComponentRegistry = new DefinitionRegistry();
        testComponentRegistry.registerComponentFamilyDefinition(new AzureStorageFamilyDefinition());
        componentService = new ComponentServiceImpl(testComponentRegistry);
    }
    return componentService;
}
Also used : ComponentServiceImpl(org.talend.components.api.service.common.ComponentServiceImpl) DefinitionRegistry(org.talend.components.api.service.common.DefinitionRegistry)

Example 22 with DefinitionRegistry

use of org.talend.components.api.service.common.DefinitionRegistry in project components by Talend.

the class JiraReaderTest method setupService.

/**
 * Creates {@link ComponentService} for tests
 */
@BeforeClass
public static void setupService() {
    DefinitionRegistry registry = new DefinitionRegistry();
    registry.registerDefinition(Arrays.asList(new TJiraInputDefinition()));
    componentService = new ComponentServiceImpl(registry);
}
Also used : ComponentServiceImpl(org.talend.components.api.service.common.ComponentServiceImpl) TJiraInputDefinition(org.talend.components.jira.tjirainput.TJiraInputDefinition) DefinitionRegistry(org.talend.components.api.service.common.DefinitionRegistry) BeforeClass(org.junit.BeforeClass)

Example 23 with DefinitionRegistry

use of org.talend.components.api.service.common.DefinitionRegistry in project components by Talend.

the class MarketoTestBase method getDefinitionRegistry.

@Override
public DefinitionRegistryService getDefinitionRegistry() {
    if (testComponentRegistry == null) {
        testComponentRegistry = new DefinitionRegistry();
        testComponentRegistry.registerComponentFamilyDefinition(new MarketoFamilyDefinition());
    }
    return testComponentRegistry;
}
Also used : DefinitionRegistry(org.talend.components.api.service.common.DefinitionRegistry)

Example 24 with DefinitionRegistry

use of org.talend.components.api.service.common.DefinitionRegistry in project components by Talend.

the class SalesforceTest method getDefinitionRegistry.

@Override
public DefinitionRegistryService getDefinitionRegistry() {
    if (testComponentRegistry == null) {
        testComponentRegistry = new DefinitionRegistry();
        testComponentRegistry.registerComponentFamilyDefinition(new SalesforceFamilyDefinition());
    }
    return testComponentRegistry;
}
Also used : SalesforceFamilyDefinition(org.talend.components.salesforce.SalesforceFamilyDefinition) DefinitionRegistry(org.talend.components.api.service.common.DefinitionRegistry)

Example 25 with DefinitionRegistry

use of org.talend.components.api.service.common.DefinitionRegistry in project components by Talend.

the class SalesforceTestBase method getComponentService.

// default implementation for pure java test. Shall be overriden of Spring or OSGI tests
@Override
public ComponentService getComponentService() {
    if (componentService == null) {
        DefinitionRegistry testComponentRegistry = new DefinitionRegistry();
        // register component
        testComponentRegistry.registerComponentFamilyDefinition(new SalesforceFamilyDefinition());
        componentService = new ComponentServiceImpl(testComponentRegistry);
    }
    return componentService;
}
Also used : SalesforceFamilyDefinition(org.talend.components.salesforce.SalesforceFamilyDefinition) ComponentServiceImpl(org.talend.components.api.service.common.ComponentServiceImpl) DefinitionRegistry(org.talend.components.api.service.common.DefinitionRegistry)

Aggregations

DefinitionRegistry (org.talend.components.api.service.common.DefinitionRegistry)27 ComponentServiceImpl (org.talend.components.api.service.common.ComponentServiceImpl)12 Test (org.junit.Test)5 URL (java.net.URL)3 ComponentInstaller (org.talend.components.api.ComponentInstaller)3 SalesforceFamilyDefinition (org.talend.components.salesforce.SalesforceFamilyDefinition)3 BeforeClass (org.junit.BeforeClass)2 TJiraInputDefinition (org.talend.components.jira.tjirainput.TJiraInputDefinition)2 SnowflakeFamilyDefinition (org.talend.components.snowflake.SnowflakeFamilyDefinition)2 ComponentFamilyDefinition (org.talend.components.api.ComponentFamilyDefinition)1 ComponentService (org.talend.components.api.service.ComponentService)1 SimpleComponentDefinition (org.talend.components.api.test.SimpleComponentDefinition)1 AbstractTestFormatProperties (org.talend.components.common.format.instances.AbstractTestFormatProperties)1 TestFormatDefinition1Impl (org.talend.components.common.format.instances.TestFormatDefinition1Impl)1 TestFormatDefinition2Impl (org.talend.components.common.format.instances.TestFormatDefinition2Impl)1 LocalIOComponentFamilyDefinition (org.talend.components.localio.LocalIOComponentFamilyDefinition)1 FixedFlowInputDefinition (org.talend.components.localio.fixedflowinput.FixedFlowInputDefinition)1 SimpleFileIOComponentFamilyDefinition (org.talend.components.simplefileio.SimpleFileIOComponentFamilyDefinition)1 SimpleFileIODatasetDefinition (org.talend.components.simplefileio.SimpleFileIODatasetDefinition)1 SimpleFileIODatastoreDefinition (org.talend.components.simplefileio.SimpleFileIODatastoreDefinition)1