Search in sources :

Example 71 with ComponentProperties

use of org.talend.components.api.properties.ComponentProperties in project components by Talend.

the class TSplunkEventCollectorTestIT method testAfterExtendedOutput.

@Test
public void testAfterExtendedOutput() throws Throwable {
    ComponentProperties props;
    props = new TSplunkEventCollectorDefinition().createProperties();
    ComponentTestUtils.checkSerialize(props, errorCollector);
    Property<Boolean> extendedOutput = (Property<Boolean>) props.getProperty("extendedOutput");
    assertEquals(true, extendedOutput.getValue());
    Form advForm = props.getForm(Form.ADVANCED);
    assertFalse(advForm.getWidget("eventsBatchSize").isHidden());
    extendedOutput.setValue(false);
    props = checkAndAfter(advForm, "extendedOutput", props);
    advForm = props.getForm(Form.ADVANCED);
    assertTrue(advForm.isRefreshUI());
    assertTrue(advForm.getWidget("eventsBatchSize").isHidden());
}
Also used : ComponentProperties(org.talend.components.api.properties.ComponentProperties) Form(org.talend.daikon.properties.presentation.Form) Property(org.talend.daikon.properties.property.Property) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 72 with ComponentProperties

use of org.talend.components.api.properties.ComponentProperties in project components by Talend.

the class FileDelimitedTestBasic method checkAndAfter.

protected ComponentProperties checkAndAfter(Form form, String propName, ComponentProperties props) throws Throwable {
    assertTrue(form.getWidget(propName).isCallAfter());
    ComponentProperties afterProperty = (ComponentProperties) getComponentService().afterProperty(propName, props);
    assertEquals("ComponentProperties after failed[" + props.getClass().getCanonicalName() + "/after" + StringUtils.capitalize(propName) + "] :" + afterProperty.getValidationResult().getMessage(), ValidationResult.Result.OK, afterProperty.getValidationResult().getStatus());
    return afterProperty;
}
Also used : ComponentProperties(org.talend.components.api.properties.ComponentProperties)

Example 73 with ComponentProperties

use of org.talend.components.api.properties.ComponentProperties in project components by Talend.

the class SalesforceTestBase method checkAndAfter.

protected ComponentProperties checkAndAfter(Form form, String propName, ComponentProperties props) throws Throwable {
    assertTrue(form.getWidget(propName).isCallAfter());
    ComponentProperties afterProperty = (ComponentProperties) getComponentService().afterProperty(propName, props);
    assertEquals("ComponentProperties after failed[" + props.getClass().getCanonicalName() + "/after" + StringUtils.capitalize(propName) + "] :" + afterProperty.getValidationResult().getMessage(), ValidationResult.Result.OK, afterProperty.getValidationResult().getStatus());
    return afterProperty;
}
Also used : ComponentProperties(org.talend.components.api.properties.ComponentProperties)

Example 74 with ComponentProperties

use of org.talend.components.api.properties.ComponentProperties in project components by Talend.

the class SalesforceComponentTestIT method testGetProps.

@Test
public void testGetProps() {
    ComponentProperties props = new TSalesforceConnectionDefinition().createProperties();
    Form f = props.getForm(Form.MAIN);
    ComponentTestUtils.checkSerialize(props, errorCollector);
    LOGGER.debug(f.toString());
    LOGGER.debug(props.toString());
    assertEquals(Form.MAIN, f.getName());
}
Also used : ComponentProperties(org.talend.components.api.properties.ComponentProperties) Form(org.talend.daikon.properties.presentation.Form) TSalesforceConnectionDefinition(org.talend.components.salesforce.tsalesforceconnection.TSalesforceConnectionDefinition) Test(org.junit.Test)

Example 75 with ComponentProperties

use of org.talend.components.api.properties.ComponentProperties in project components by Talend.

the class SalesforceComponentTestIT method testRuntimeInfo.

@Test
public void testRuntimeInfo() {
    ComponentDefinition definition = getComponentService().getComponentDefinition(TSalesforceBulkExecDefinition.COMPONENT_NAME);
    ComponentProperties properties = this.getComponentService().getComponentProperties(TSalesforceBulkExecDefinition.COMPONENT_NAME);
    assertNotNull("should not null", definition.getRuntimeInfo(ExecutionEngine.DI, properties, ConnectorTopology.NONE));
    assertNotNull("should not null", definition.getRuntimeInfo(ExecutionEngine.DI, properties, ConnectorTopology.OUTGOING));
}
Also used : ComponentProperties(org.talend.components.api.properties.ComponentProperties) ComponentDefinition(org.talend.components.api.component.ComponentDefinition) Test(org.junit.Test)

Aggregations

ComponentProperties (org.talend.components.api.properties.ComponentProperties)76 Test (org.junit.Test)22 Form (org.talend.daikon.properties.presentation.Form)17 Property (org.talend.daikon.properties.property.Property)17 ArrayList (java.util.ArrayList)16 NamedThing (org.talend.daikon.NamedThing)13 GenericConnection (org.talend.repository.generic.model.genericMetadata.GenericConnection)13 Properties (org.talend.daikon.properties.Properties)10 List (java.util.List)9 IElementParameter (org.talend.core.model.process.IElementParameter)9 INode (org.talend.core.model.process.INode)9 IMetadataTable (org.talend.core.model.metadata.IMetadataTable)8 Schema (org.apache.avro.Schema)7 ComponentDefinition (org.talend.components.api.component.ComponentDefinition)7 ComponentService (org.talend.components.api.service.ComponentService)7 ComponentWizard (org.talend.components.api.wizard.ComponentWizard)7 MetadataTable (org.talend.core.model.metadata.builder.connection.MetadataTable)7 ConnectionItem (org.talend.core.model.properties.ConnectionItem)7 GenericElementParameter (org.talend.designer.core.generic.model.GenericElementParameter)7 ElementParameter (org.talend.designer.core.model.components.ElementParameter)7