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());
}
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;
}
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;
}
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());
}
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));
}
Aggregations