Search in sources :

Example 6 with DefinitionRegistry

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

the class CouchbaseFamilyDefinitionTest method testInstall.

@Test
public void testInstall() {
    DefinitionRegistry ctx = new DefinitionRegistry();
    definition.install(ctx);
    Assert.assertEquals(2, ctx.getDefinitions().size());
}
Also used : DefinitionRegistry(org.talend.components.api.service.common.DefinitionRegistry) Test(org.junit.Test)

Example 7 with DefinitionRegistry

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

the class JDBCTest method getDefinitionRegistry.

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

Example 8 with DefinitionRegistry

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

the class JiraReaderTestIT 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 9 with DefinitionRegistry

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

the class FileDelimitedTestBasic method getComponentService.

@Override
public ComponentService getComponentService() {
    if (componentService == null) {
        DefinitionRegistry testComponentRegistry = new DefinitionRegistry();
        testComponentRegistry.registerComponentFamilyDefinition(new FileDelimitedFamilyDefinition());
        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 DefinitionRegistry

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

the class TFilterRowTest method getComponentService.

// default implementation for pure java test.
public ComponentService getComponentService() {
    if (componentService == null) {
        DefinitionRegistry testComponentRegistry = new DefinitionRegistry();
        testComponentRegistry.registerComponentFamilyDefinition(new TFilterRowFamilyDefinition());
        componentService = new ComponentServiceImpl(testComponentRegistry);
    }
    return componentService;
}
Also used : 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