use of org.talend.components.marketo.tmarketoinput.TMarketoInputProperties in project components by Talend.
the class MarketoInputReaderTestIT method testLeadActivityWithEmptyActivitiesREST.
@Test(expected = IOException.class)
public void testLeadActivityWithEmptyActivitiesREST() throws Exception {
TMarketoInputProperties props = getRESTProperties();
props.inputOperation.setValue(getLeadActivity);
String since = new SimpleDateFormat(DATETIME_PATTERN_PARAM).format(new Date(new Date().getTime() - 10000000));
props.sinceDateTime.setValue(since);
props.batchSize.setValue(300);
props.afterInputOperation();
props.beforeMappingInput();
props.setIncludeTypes.setValue(true);
// props.includeTypes.type.setValue(Arrays.asList());
reader = getReader(props);
assertTrue(reader.start());
fail("Shouldn't be here");
}
use of org.talend.components.marketo.tmarketoinput.TMarketoInputProperties in project components by Talend.
the class MarketoInputReaderTestIT method testMultipleLeadsSOAP.
@Test
public void testMultipleLeadsSOAP() throws Exception {
TMarketoInputProperties props = getSOAPProperties();
props.inputOperation.setValue(getMultipleLeads);
props.leadSelectorSOAP.setValue(StaticListSelector);
props.listParam.setValue(STATIC_LIST_NAME);
props.listParamListName.setValue(UNDX_TEST_LIST_SMALL);
props.batchSize.setValue(50);
props.afterInputOperation();
reader = getReader(props);
assertTrue(reader.start());
LOG.debug("record = {}.", reader.getCurrent());
assertTrue(reader.advance());
LOG.debug("record = {}.", reader.getCurrent());
while (reader.advance()) {
assertNotNull(reader.getCurrent());
// LOG.debug("email: {}", reader.getCurrent().get(1));
}
assertTrue(((int) reader.getReturnValues().get(RETURN_NB_CALL)) > 1);
}
use of org.talend.components.marketo.tmarketoinput.TMarketoInputProperties in project components by Talend.
the class MarketoInputReaderTestIT method testLeadActivitySOAP.
@Test
public void testLeadActivitySOAP() throws Exception {
TMarketoInputProperties props = getSOAPProperties();
props.inputOperation.setValue(getLeadActivity);
props.leadKeyTypeSOAP.setValue(EMAIL);
props.leadSelectorSOAP.setValue(LeadKeySelector);
props.afterInputOperation();
props.batchSize.setValue(5);
//
props.leadKeyValue.setValue(EMAIL_LEAD_MANY_INFOS);
reader = getReader(props);
assertTrue(reader.start());
LOG.debug("record = {}.", reader.getCurrent());
assertTrue(reader.advance());
LOG.debug("record = {}.", reader.getCurrent());
while (reader.advance()) {
assertNotNull(reader.getCurrent());
// LOG.debug("email: {}", reader.getCurrent().get(1));
}
assertTrue(((int) reader.getReturnValues().get(RETURN_NB_CALL)) > 1);
}
use of org.talend.components.marketo.tmarketoinput.TMarketoInputProperties in project components by Talend.
the class MarketoInputReaderTestIT method getRESTProperties.
public TMarketoInputProperties getRESTProperties() {
TMarketoInputProperties props = new TMarketoInputProperties("test");
props.connection.setupProperties();
props.connection.endpoint.setValue(ENDPOINT_REST);
props.connection.clientAccessId.setValue(USERID_REST);
props.connection.secretKey.setValue(SECRETKEY_REST);
props.connection.apiMode.setValue(REST);
props.connection.setupLayout();
props.mappingInput.setupProperties();
props.setupProperties();
props.schemaInput.setupProperties();
props.schemaInput.setupLayout();
props.includeTypes.setupProperties();
props.includeTypes.type.setValue(new ArrayList<String>());
props.excludeTypes.setupProperties();
props.excludeTypes.type.setValue(new ArrayList<String>());
props.setupLayout();
return props;
}
use of org.talend.components.marketo.tmarketoinput.TMarketoInputProperties in project components by Talend.
the class MarketoInputReaderTestIT method testLeadActivityFailSOAP.
@Test(expected = IOException.class)
public void testLeadActivityFailSOAP() throws Exception {
TMarketoInputProperties props = getSOAPProperties();
props.inputOperation.setValue(getLeadActivity);
props.leadKeyTypeSOAP.setValue(IDNUM);
props.leadSelectorSOAP.setValue(LeadKeySelector);
props.afterInputOperation();
props.batchSize.setValue(5);
//
props.leadKeyValue.setValue("4218473");
reader = getReader(props);
reader.start();
fail("Should not be here");
}
Aggregations