Search in sources :

Example 1 with JiraSource

use of org.talend.components.jira.runtime.JiraSource in project components by Talend.

the class JiraReaderTestIT method setupSource.

private void setupSource() {
    source = new JiraSource();
    source.initialize(container, properties);
}
Also used : JiraSource(org.talend.components.jira.runtime.JiraSource)

Example 2 with JiraSource

use of org.talend.components.jira.runtime.JiraSource in project components by Talend.

the class JiraReaderTest method testGetCurrentSource.

/**
 * Checks {@link JiraReader#getCurrentSource()} returns {@link Source}, which was passed to constructor as argument
 * without any changes
 *
 * @throws IOException in case of any exception
 */
@Test
public void testGetCurrentSource() throws IOException {
    JiraProjectsReader jiraReader = new JiraProjectsReader(source);
    JiraSource currentSource = jiraReader.getCurrentSource();
    jiraReader.close();
    assertEquals(source, currentSource);
}
Also used : JiraSource(org.talend.components.jira.runtime.JiraSource) Test(org.junit.Test)

Example 3 with JiraSource

use of org.talend.components.jira.runtime.JiraSource in project components by Talend.

the class JiraReaderTest method setupSource.

private void setupSource() {
    source = new JiraSource();
    source.initialize(container, properties);
}
Also used : JiraSource(org.talend.components.jira.runtime.JiraSource)

Example 4 with JiraSource

use of org.talend.components.jira.runtime.JiraSource in project components by Talend.

the class TJiraInputDefinitionTest method testGetRuntime.

/**
 * Check {@link TJiraInputDefinition#getRuntime()} returns instance of {@link JiraSource}
 */
@Test
public void testGetRuntime() {
    TJiraInputDefinition definition = new TJiraInputDefinition();
    RuntimeInfo runtimeInfo = definition.getRuntimeInfo(ExecutionEngine.DI, null, ConnectorTopology.OUTGOING);
    SandboxedInstance sandboxedInstance = RuntimeUtil.createRuntimeClass(runtimeInfo, definition.getClass().getClassLoader());
    Source source = (Source) sandboxedInstance.getInstance();
    assertThat(source, is(instanceOf(JiraSource.class)));
}
Also used : SandboxedInstance(org.talend.daikon.sandbox.SandboxedInstance) RuntimeInfo(org.talend.daikon.runtime.RuntimeInfo) JiraSource(org.talend.components.jira.runtime.JiraSource) Source(org.talend.components.api.component.runtime.Source) Test(org.junit.Test)

Aggregations

JiraSource (org.talend.components.jira.runtime.JiraSource)4 Test (org.junit.Test)2 Source (org.talend.components.api.component.runtime.Source)1 RuntimeInfo (org.talend.daikon.runtime.RuntimeInfo)1 SandboxedInstance (org.talend.daikon.sandbox.SandboxedInstance)1