Search in sources :

Example 6 with ComponentServiceImpl

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

the class TestFixedConnectorComponentProperties method getComponentService.

// default implementation for pure java test. Shall be overriden of Spring or OSGI tests
public ComponentService getComponentService() {
    DefinitionRegistry testComponentRegistry = new DefinitionRegistry();
    SimpleComponentDefinition componentDef = new SimpleComponentDefinition("foo", ExecutionEngine.DI);
    componentDef.setPropertyClass(TestProperties.class);
    testComponentRegistry.registerDefinition(Arrays.asList(componentDef));
    return new ComponentServiceImpl(testComponentRegistry);
}
Also used : SimpleComponentDefinition(org.talend.components.api.test.SimpleComponentDefinition) ComponentServiceImpl(org.talend.components.api.service.common.ComponentServiceImpl) DefinitionRegistry(org.talend.components.api.service.common.DefinitionRegistry)

Example 7 with ComponentServiceImpl

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

the class FullExamplePropertiesTest method getComponentService.

@Override
public ComponentService getComponentService() {
    if (simpleComponentService == null) {
        DefinitionRegistry componentRegistry = new DefinitionRegistry();
        componentRegistry.registerComponentFamilyDefinition(new FullExampleFamilyDefinition());
        simpleComponentService = new ComponentServiceImpl(componentRegistry);
    }
    return simpleComponentService;
}
Also used : ComponentServiceImpl(org.talend.components.api.service.common.ComponentServiceImpl) DefinitionRegistry(org.talend.components.api.service.common.DefinitionRegistry)

Example 8 with ComponentServiceImpl

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

the class MultiRuntimeComponentTest method getComponentService.

// default implementation for pure java test.
public ComponentService getComponentService() {
    if (componentService == null) {
        DefinitionRegistry testComponentRegistry = new DefinitionRegistry();
        testComponentRegistry.registerDefinition(Arrays.asList(new MultiRuntimeComponentDefinition()));
        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 9 with ComponentServiceImpl

use of org.talend.components.api.service.common.ComponentServiceImpl 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 10 with ComponentServiceImpl

use of org.talend.components.api.service.common.ComponentServiceImpl 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)

Aggregations

ComponentServiceImpl (org.talend.components.api.service.common.ComponentServiceImpl)12 DefinitionRegistry (org.talend.components.api.service.common.DefinitionRegistry)12 BeforeClass (org.junit.BeforeClass)2 TJiraInputDefinition (org.talend.components.jira.tjirainput.TJiraInputDefinition)2 SalesforceFamilyDefinition (org.talend.components.salesforce.SalesforceFamilyDefinition)2 SimpleComponentDefinition (org.talend.components.api.test.SimpleComponentDefinition)1 SnowflakeFamilyDefinition (org.talend.components.snowflake.SnowflakeFamilyDefinition)1