Search in sources :

Example 6 with DatasetProperties

use of org.talend.components.common.dataset.DatasetProperties in project components by Talend.

the class SalesforceDatastoreDefinitionTest method testCreateDatasetProperties.

@Test
public void testCreateDatasetProperties() throws Exception {
    try (SalesforceTestBase.MockRuntimeSourceOrSinkTestFixture testFixture = new SalesforceTestBase.MockRuntimeSourceOrSinkTestFixture(isA(SalesforceInputProperties.class), createDefaultTestDataset())) {
        testFixture.setUp();
        DatasetProperties datasetProperties = definition.createDatasetProperties(properties);
        assertEquals(properties, datasetProperties.getDatastoreProperties());
        Form mainForm = properties.getForm(Form.MAIN);
        assertNotNull(mainForm);
        assertNotNull(mainForm.getWidget(properties.userId.getName()));
        assertNotNull(mainForm.getWidget(properties.password.getName()));
        assertNotNull(mainForm.getWidget(properties.securityKey.getName()));
    }
}
Also used : SalesforceTestBase(org.talend.components.salesforce.SalesforceTestBase) Form(org.talend.daikon.properties.presentation.Form) DatasetProperties(org.talend.components.common.dataset.DatasetProperties) SalesforceInputProperties(org.talend.components.salesforce.dataprep.SalesforceInputProperties) Test(org.junit.Test)

Aggregations

DatasetProperties (org.talend.components.common.dataset.DatasetProperties)6 Test (org.junit.Test)4 DatastoreProperties (org.talend.components.common.datastore.DatastoreProperties)2 SandboxedInstance (org.talend.daikon.sandbox.SandboxedInstance)2 IndexedRecord (org.apache.avro.generic.IndexedRecord)1 ComponentDefinition (org.talend.components.api.component.ComponentDefinition)1 ExecutionEngine (org.talend.components.api.component.runtime.ExecutionEngine)1 Sink (org.talend.components.api.component.runtime.Sink)1 WriteOperation (org.talend.components.api.component.runtime.WriteOperation)1 WriterDataSupplier (org.talend.components.api.component.runtime.WriterDataSupplier)1 ComponentProperties (org.talend.components.api.properties.ComponentProperties)1 DatasetRuntime (org.talend.components.common.dataset.runtime.DatasetRuntime)1 SalesforceTestBase (org.talend.components.salesforce.SalesforceTestBase)1 SalesforceInputProperties (org.talend.components.salesforce.dataprep.SalesforceInputProperties)1 TalendRuntimeException (org.talend.daikon.exception.TalendRuntimeException)1 Properties (org.talend.daikon.properties.Properties)1 Form (org.talend.daikon.properties.presentation.Form)1