Search in sources :

Example 96 with Form

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());
}
Also used : Form(org.talend.daikon.properties.presentation.Form) Widget(org.talend.daikon.properties.presentation.Widget) Test(org.junit.Test)

Example 97 with Form

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);
}
Also used : Form(org.talend.daikon.properties.presentation.Form) Test(org.junit.Test)

Example 98 with 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);
}
Also used : Form(org.talend.daikon.properties.presentation.Form) Test(org.junit.Test)

Example 99 with Form

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));
}
Also used : Form(org.talend.daikon.properties.presentation.Form)

Example 100 with Form

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"));
}
Also used : TSnowflakeInputDefinition(org.talend.components.snowflake.tsnowflakeinput.TSnowflakeInputDefinition) IndexedRecord(org.apache.avro.generic.IndexedRecord) Form(org.talend.daikon.properties.presentation.Form) Schema(org.apache.avro.Schema) TSnowflakeInputProperties(org.talend.components.snowflake.tsnowflakeinput.TSnowflakeInputProperties) Test(org.junit.Test)

Aggregations

Form (org.talend.daikon.properties.presentation.Form)436 Test (org.junit.Test)199 Widget (org.talend.daikon.properties.presentation.Widget)73 ComponentProperties (org.talend.components.api.properties.ComponentProperties)17 Property (org.talend.daikon.properties.property.Property)13 SalesforceConnectionProperties (org.talend.components.salesforce.SalesforceConnectionProperties)12 Schema (org.apache.avro.Schema)10 ArrayList (java.util.ArrayList)9 ComponentWizard (org.talend.components.api.wizard.ComponentWizard)8 NamedThing (org.talend.daikon.NamedThing)8 INode (org.talend.core.model.process.INode)7 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)6 SnowflakeTableProperties (org.talend.components.snowflake.SnowflakeTableProperties)6 GenericElementParameter (org.talend.designer.core.generic.model.GenericElementParameter)6 ElementParameter (org.talend.designer.core.model.components.ElementParameter)6 List (java.util.List)5 SalesforceInputProperties (org.talend.components.salesforce.dataprep.SalesforceInputProperties)5 PresentationItem (org.talend.daikon.properties.PresentationItem)5 ComponentWizardDefinition (org.talend.components.api.wizard.ComponentWizardDefinition)4 MarkLogicConnectionPropertiesTest (org.talend.components.marklogic.tmarklogicconnection.MarkLogicConnectionPropertiesTest)4