Search in sources :

Example 21 with RuntimeInfo

use of org.talend.daikon.runtime.RuntimeInfo in project components by Talend.

the class TSalesforceConnectionDefinitionTest method testRuntimeInfo.

@Test
public void testRuntimeInfo() {
    RuntimeInfo runtimeInfo = definition.getRuntimeInfo(ExecutionEngine.DI, properties, ConnectorTopology.NONE);
    assertThat(runtimeInfo, instanceOf(JarRuntimeInfo.class));
    JarRuntimeInfo jarRuntimeInfo = (JarRuntimeInfo) runtimeInfo;
    assertNotNull(jarRuntimeInfo.getJarUrl());
    assertNotNull(jarRuntimeInfo.getDepTxtPath());
    assertEquals(SOURCE_OR_SINK_CLASS, jarRuntimeInfo.getRuntimeClassName());
    runtimeInfo = definition.getRuntimeInfo(ExecutionEngine.DI, properties, ConnectorTopology.OUTGOING);
    assertThat(runtimeInfo, nullValue(RuntimeInfo.class));
}
Also used : RuntimeInfo(org.talend.daikon.runtime.RuntimeInfo) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) Test(org.junit.Test)

Example 22 with RuntimeInfo

use of org.talend.daikon.runtime.RuntimeInfo in project components by Talend.

the class TSalesforceGetServerTimestampDefinitionTest method testRuntimeInfo.

@Test
public void testRuntimeInfo() {
    RuntimeInfo runtimeInfo = definition.getRuntimeInfo(ExecutionEngine.DI, properties, ConnectorTopology.OUTGOING);
    assertRuntimeInfo(runtimeInfo);
    runtimeInfo = definition.getRuntimeInfo(ExecutionEngine.DI, properties, ConnectorTopology.NONE);
    assertThat(runtimeInfo, nullValue(RuntimeInfo.class));
}
Also used : RuntimeInfo(org.talend.daikon.runtime.RuntimeInfo) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) Test(org.junit.Test)

Example 23 with RuntimeInfo

use of org.talend.daikon.runtime.RuntimeInfo in project components by Talend.

the class CouchbaseInputDefinitionTest method testGetRuntimeInfo.

@Test
public void testGetRuntimeInfo() {
    RuntimeInfo runtimeInfo = definition.getRuntimeInfo(ExecutionEngine.DI, null, ConnectorTopology.OUTGOING);
    Assert.assertEquals(CouchbaseSource.class.getName(), runtimeInfo.getRuntimeClassName());
}
Also used : RuntimeInfo(org.talend.daikon.runtime.RuntimeInfo) CouchbaseSource(org.talend.components.couchbase.runtime.CouchbaseSource) Test(org.junit.Test)

Example 24 with RuntimeInfo

use of org.talend.daikon.runtime.RuntimeInfo in project components by Talend.

the class BigQueryDatasetDefinitionTest method testRuntimeInfo.

/**
 * Check {@link BigQueryDatasetDefinition#getRuntimeInfo(BigQueryDatasetProperties)} returns RuntimeInfo,
 * which runtime class name is "org.talend.components.bigquery.runtime.BigQueryDatasetRuntime"
 */
@Test
@Ignore("This can't work unless the runtime jar is already installed in maven!")
public void testRuntimeInfo() {
    RuntimeInfo runtimeInfo = datasetDefinition.getRuntimeInfo(null);
    assertEquals("org.talend.components.bigquery.runtime.BigQueryDatasetRuntime", runtimeInfo.getRuntimeClassName());
}
Also used : RuntimeInfo(org.talend.daikon.runtime.RuntimeInfo) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 25 with RuntimeInfo

use of org.talend.daikon.runtime.RuntimeInfo in project components by Talend.

the class BigQueryOutputDefinitionTest method testRuntimeInfo.

@Test
@Ignore("This can't work unless the runtime jar is already installed in maven!")
public void testRuntimeInfo() {
    RuntimeInfo runtimeInfo = outputDefinition.getRuntimeInfo(ExecutionEngine.BEAM, null, null);
    assertEquals("org.talend.components.bigquery.runtime.BigQueryOutputRuntime", runtimeInfo.getRuntimeClassName());
}
Also used : RuntimeInfo(org.talend.daikon.runtime.RuntimeInfo) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

RuntimeInfo (org.talend.daikon.runtime.RuntimeInfo)131 Test (org.junit.Test)120 SandboxedInstance (org.talend.daikon.sandbox.SandboxedInstance)27 Ignore (org.junit.Ignore)21 JarRuntimeInfo (org.talend.components.api.component.runtime.JarRuntimeInfo)17 ArrayList (java.util.ArrayList)13 AllSetting (org.talend.components.jdbc.runtime.setting.AllSetting)11 IndexedRecord (org.apache.avro.generic.IndexedRecord)8 ExecutionEngine (org.talend.components.api.component.runtime.ExecutionEngine)8 DatasetRuntime (org.talend.components.common.dataset.runtime.DatasetRuntime)7 URL (java.net.URL)6 Schema (org.apache.avro.Schema)6 ComponentException (org.talend.components.api.exception.ComponentException)5 ValidationResult (org.talend.daikon.properties.ValidationResult)5 File (java.io.File)3 NamedThing (org.talend.daikon.NamedThing)3 SimpleNamedThing (org.talend.daikon.SimpleNamedThing)3 TalendRuntimeException (org.talend.daikon.exception.TalendRuntimeException)3 FileWriter (java.io.FileWriter)2 GenericRecord (org.apache.avro.generic.GenericRecord)2