Search in sources :

Example 1 with SalesforceDatasetProperties

use of org.talend.components.salesforce.dataset.SalesforceDatasetProperties in project components by Talend.

the class SalesforceSchemaUtilsTest method setUp.

@Before
public void setUp() {
    datasetProperties = new SalesforceDatasetProperties("dataset");
    datasetProperties.init();
    dataprepSource = spy(new SalesforceDataprepSource());
}
Also used : SalesforceDatasetProperties(org.talend.components.salesforce.dataset.SalesforceDatasetProperties) Before(org.junit.Before)

Example 2 with SalesforceDatasetProperties

use of org.talend.components.salesforce.dataset.SalesforceDatasetProperties in project components by Talend.

the class SalesforceDatasetRuntimeTestIT method testGetSchemaForQuery.

@Test
public void testGetSchemaForQuery() {
    SalesforceDatasetProperties dataset = createDatasetPropertiesForQuery();
    SalesforceDatasetRuntime runtime = new SalesforceDatasetRuntime();
    runtime.initialize(null, dataset);
    Schema schema = runtime.getSchema();
    Assert.assertNotNull(schema);
    Assert.assertTrue("empty schema", schema.getFields().size() > 0);
}
Also used : Schema(org.apache.avro.Schema) SalesforceDatasetProperties(org.talend.components.salesforce.dataset.SalesforceDatasetProperties) Test(org.junit.Test)

Example 3 with SalesforceDatasetProperties

use of org.talend.components.salesforce.dataset.SalesforceDatasetProperties in project components by Talend.

the class SalesforceDatasetRuntimeTestIT method testGetSampleForModule.

@Test
public void testGetSampleForModule() {
    SalesforceDatasetProperties dataset = createDatasetPropertiesForModule();
    dataset.selectColumnIds.setValue(Arrays.asList("IsDeleted", "Id"));
    getSampleAction(dataset);
}
Also used : SalesforceDatasetProperties(org.talend.components.salesforce.dataset.SalesforceDatasetProperties) Test(org.junit.Test)

Example 4 with SalesforceDatasetProperties

use of org.talend.components.salesforce.dataset.SalesforceDatasetProperties in project components by Talend.

the class SalesforceDatasetRuntimeTestIT method testGetSchemaForModule.

@Test
public void testGetSchemaForModule() {
    SalesforceDatasetProperties dataset = createDatasetPropertiesForModule();
    dataset.selectColumnIds.setValue(Arrays.asList("IsDeleted", "Id"));
    SalesforceDatasetRuntime runtime = new SalesforceDatasetRuntime();
    runtime.initialize(null, dataset);
    Schema schema = runtime.getSchema();
    Assert.assertNotNull(schema);
    Assert.assertTrue("empty schema", schema.getFields().size() > 0);
}
Also used : Schema(org.apache.avro.Schema) SalesforceDatasetProperties(org.talend.components.salesforce.dataset.SalesforceDatasetProperties) Test(org.junit.Test)

Example 5 with SalesforceDatasetProperties

use of org.talend.components.salesforce.dataset.SalesforceDatasetProperties in project components by Talend.

the class SalesforceInputPropertiesTest method setUp.

@Before
public void setUp() {
    datasetProperties = new SalesforceDatasetProperties("dataset");
    properties = new SalesforceInputProperties("root");
}
Also used : SalesforceDatasetProperties(org.talend.components.salesforce.dataset.SalesforceDatasetProperties) Before(org.junit.Before)

Aggregations

SalesforceDatasetProperties (org.talend.components.salesforce.dataset.SalesforceDatasetProperties)13 Test (org.junit.Test)5 SalesforceDatastoreDefinition (org.talend.components.salesforce.datastore.SalesforceDatastoreDefinition)5 SalesforceDatastoreProperties (org.talend.components.salesforce.datastore.SalesforceDatastoreProperties)5 SalesforceInputProperties (org.talend.components.salesforce.dataprep.SalesforceInputProperties)3 Schema (org.apache.avro.Schema)2 Before (org.junit.Before)2 SalesforceInputDefinition (org.talend.components.salesforce.dataprep.SalesforceInputDefinition)2 IndexedRecord (org.apache.avro.generic.IndexedRecord)1 Consumer (org.talend.daikon.java8.Consumer)1 ValidationResult (org.talend.daikon.properties.ValidationResult)1