use of org.talend.components.filedelimited.tfileinputdelimited.TFileInputDelimitedProperties in project components by Talend.
the class FileDelimitedReaderTestIT method testInputDieOnErrorCsvMode.
// Test FileInputDelimited component read with CSV mode and die on error
@Test(expected = RuntimeException.class)
public void testInputDieOnErrorCsvMode() throws Throwable {
String resources = getClass().getResource("/runtime/input").toURI().getPath();
String inputFile = resources + "/test_input_csv_reject.csv";
LOGGER.debug("Test file path: " + inputFile);
TFileInputDelimitedProperties properties = createInputProperties(inputFile, true);
properties.dieOnError.setValue(true);
try {
testInputReject(properties);
} catch (Exception e) {
LOGGER.debug("Expect exception: " + e.getMessage());
throw e;
}
}
use of org.talend.components.filedelimited.tfileinputdelimited.TFileInputDelimitedProperties in project components by Talend.
the class FileDelimitedWizardTestIT method testWizardSupportComponents.
@Test
public void testWizardSupportComponents() {
// This control the "Property Type" showed in component
TFileInputDelimitedProperties input = (TFileInputDelimitedProperties) new TFileInputDelimitedDefinition().createProperties();
TFileOutputDelimitedProperties output = (TFileOutputDelimitedProperties) new TFileOutputDelimitedDefinition().createProperties();
List<ComponentWizard> wizards = getComponentService().getComponentWizardsForProperties(input, null);
assertTrue(wizards.get(0) instanceof FileDelimitedWizard);
wizards = getComponentService().getComponentWizardsForProperties(output, null);
assertTrue(wizards.get(0) instanceof FileDelimitedWizard);
}
Aggregations