use of org.talend.daikon.properties.presentation.Form in project components by Talend.
the class CouchbaseInputPropertiesTest method testSetupLayout.
@Test
public void testSetupLayout() {
properties.init();
Form main = properties.getForm(Form.MAIN);
assertThat(main, notNullValue());
Collection<Widget> mainWidgets = main.getWidgets();
assertThat(mainWidgets, hasSize(4));
// CouchbaseProperties widgets
Widget bucketWidget = main.getWidget("bucket");
assertThat(bucketWidget, notNullValue());
Widget passwordWidget = main.getWidget("password");
assertThat(passwordWidget, notNullValue());
Widget bootstrapNodesWidget = main.getWidget("bootstrapNodes");
assertThat(bootstrapNodesWidget, notNullValue());
Widget schemaWidget = main.getWidget("schema");
assertThat(schemaWidget, notNullValue());
}
use of org.talend.daikon.properties.presentation.Form in project components by Talend.
the class JDBCConnectionWizardPropertiesTest method testRefreshLayout.
/**
* Run the void refreshLayout(Form) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 17-6-23 PM3:31
*/
@Test
public void testRefreshLayout() throws Exception {
JDBCConnectionWizardProperties fixture = new JDBCConnectionWizardProperties("wizard");
Form form = fixture.getForm(Form.MAIN);
fixture.refreshLayout(form);
}
use of org.talend.daikon.properties.presentation.Form in project components by Talend.
the class JDBCConnectionWizardPropertiesTest method testSetupLayout.
/**
* Run the void setupLayout() method test.
*
* @throws Exception
*
* @generatedBy CodePro at 17-6-23 PM3:31
*/
@Test
public void testSetupLayout() throws Exception {
JDBCConnectionWizardProperties fixture = new JDBCConnectionWizardProperties("");
fixture.init();
Form main = fixture.getForm(Form.MAIN);
assertNotNull(main);
}
use of org.talend.daikon.properties.presentation.Form in project components by Talend.
the class JiraConnectionProperties method setupLayout.
/**
* {@inheritDoc}
*/
@Override
public void setupLayout() {
super.setupLayout();
Form mainForm = Form.create(this, Form.MAIN);
mainForm.addRow(hostUrl);
mainForm.addRow(basicAuthentication.getForm(Form.MAIN));
}
use of org.talend.daikon.properties.presentation.Form in project components by Talend.
the class SnowflakeReadersTestIT method testInputManual.
@Test
public void testInputManual() throws Throwable {
TSnowflakeInputProperties props = (TSnowflakeInputProperties) new TSnowflakeInputDefinition().createProperties();
setupProps(props.getConnectionProperties());
Form f = props.getForm(MAIN);
props.manualQuery.setValue(true);
props = (TSnowflakeInputProperties) PropertiesTestUtils.checkAndAfter(getComponentService(), f, props.manualQuery.getName(), props);
props.query.setValue("select ID, C7 from " + testTable + " where ID > 80");
setupTableWithStaticValues(props);
List<IndexedRecord> rows = readRows(props);
assertEquals(19, rows.size());
Schema schema = rows.get(0).getSchema();
LOGGER.debug(schema.toString());
assertEquals(BigDecimal.valueOf(81), rows.get(0).get(0));
assertThat((String) rows.get(0).get(1), containsString("\"bar\": 81"));
}
Aggregations