use of org.talend.components.jdbc.dataset.JDBCDatasetProperties in project components by Talend.
the class JDBCOutputPropertiesTest method testGetRuntimeSetting.
@Test
public void testGetRuntimeSetting() {
JDBCOutputProperties fixture = new JDBCOutputProperties("output");
JDBCDatasetProperties dataset = new JDBCDatasetProperties("dataset");
JDBCDatastoreProperties datastore = new JDBCDatastoreProperties("datastore");
datastore.init();
dataset.setDatastoreProperties(datastore);
fixture.setDatasetProperties(dataset);
AllSetting result = fixture.getRuntimeSetting();
assertNotNull(result);
}
use of org.talend.components.jdbc.dataset.JDBCDatasetProperties in project components by Talend.
the class JDBCInputPropertiesTest method testGetDatasetProperties.
/**
* Run the JDBCDatasetProperties getDatasetProperties() method test.
*
* @throws Exception
*
* @generatedBy CodePro at 17-6-23 AM11:58
*/
@Test
public void testGetDatasetProperties() throws Exception {
JDBCInputProperties fixture = new JDBCInputProperties("input");
fixture.init();
fixture.setDatasetProperties(new JDBCDatasetProperties("dataset"));
JDBCDatasetProperties result = fixture.getDatasetProperties();
assertNotNull(result);
}
use of org.talend.components.jdbc.dataset.JDBCDatasetProperties in project components by Talend.
the class JDBCDatastoreDefinition method createDatasetProperties.
@SuppressWarnings("rawtypes")
@Override
public DatasetProperties createDatasetProperties(JDBCDatastoreProperties storeProp) {
JDBCDatasetProperties datasetProperties = new JDBCDatasetProperties("dataset");
datasetProperties.init();
datasetProperties.setDatastoreProperties(storeProp);
return datasetProperties;
}
use of org.talend.components.jdbc.dataset.JDBCDatasetProperties in project components by Talend.
the class JDBCDatasetTestIT method testGetSchemaFromTable.
@Test
public void testGetSchemaFromTable() throws IOException {
JDBCDatasetProperties dataset = createDatasetProperties(false);
JDBCDatasetRuntime runtime = new JDBCDatasetRuntime();
runtime.initialize(null, dataset);
JDBCSourceOrSink jss = new JDBCSourceOrSink();
jss.initialize(null, dataset);
Schema schema = jss.getEndpointSchema(null, tablename);
Assert.assertNotNull(schema);
DBTestUtils.testMetadata(schema.getFields(), true);
jss.getEndpointSchema(null, tablename_all_type);
// TODO assert the result
}
use of org.talend.components.jdbc.dataset.JDBCDatasetProperties in project components by Talend.
the class JDBCDatasetTestIT method testUpdateSchema.
@Test
public void testUpdateSchema() {
JDBCDatasetProperties dataset = createDatasetProperties(true);
Schema schema = dataset.main.schema.getValue();
Assert.assertNotNull(schema);
DBTestUtils.testMetadata(schema.getFields(), true);
}
Aggregations