use of org.talend.components.marketo.runtime.MarketoSource in project components by Talend.
the class MarketoSOAPClientTestIT method testGetLeadsChanges.
@Test
public void testGetLeadsChanges() throws Exception {
inputProperties.inputOperation.setValue(getLeadChanges);
inputProperties.afterInputOperation();
inputProperties.beforeMappingInput();
inputProperties.batchSize.setValue(1000);
//
inputProperties.oldestCreateDate.setValue(DATE_OLDEST_CREATE);
inputProperties.latestCreateDate.setValue(DATE_LATEST_CREATE);
MarketoSource source = new MarketoSource();
source.initialize(null, inputProperties);
MarketoClientService client = source.getClientService(null);
//
MarketoRecordResult result = client.getLeadChanges(inputProperties, null);
List<IndexedRecord> changes = result.getRecords();
assertTrue(changes.size() > 0);
assertTrue(result.getRemainCount() > 0);
List<IndexedRecord> records = result.getRecords();
assertTrue(records.size() > 0);
for (IndexedRecord r : records) {
assertNotNull(r.get(0));
assertTrue(r.get(0) instanceof Long);
}
}
use of org.talend.components.marketo.runtime.MarketoSource in project components by Talend.
the class MarketoSOAPClientTestIT method testGetLeadActivityExcludeFilter.
@Test
public void testGetLeadActivityExcludeFilter() throws Exception {
inputProperties.inputOperation.setValue(getLeadActivity);
inputProperties.leadKeyTypeSOAP.setValue(EMAIL);
inputProperties.leadSelectorSOAP.setValue(LeadKeySelector);
inputProperties.updateSchemaRelated();
inputProperties.batchSize.setValue(11);
//
inputProperties.leadKeyValue.setValue(EMAIL_LEAD_MANY_INFOS);
inputProperties.setExcludeTypes.setValue(true);
inputProperties.excludeTypes.type.getValue().add(NewLead.toString());
inputProperties.excludeTypes.type.getValue().add(ChangeDataValue.toString());
MarketoSource source = new MarketoSource();
source.initialize(null, inputProperties);
MarketoClientService client = source.getClientService(null);
//
MarketoRecordResult result = client.getLeadActivity(inputProperties, null);
List<IndexedRecord> activities = result.getRecords();
assertTrue(activities.size() > 0);
for (IndexedRecord r : activities) {
assertTrue(!"New Lead".equals(r.get(2)) && !"Change Data Value".equals(r.get(2)));
}
}
use of org.talend.components.marketo.runtime.MarketoSource in project components by Talend.
the class MarketoSOAPClientTestIT method testBUG_TDI38439_MarketoWizardConnectionFail.
@Test(expected = IOException.class)
public void testBUG_TDI38439_MarketoWizardConnectionFail() throws Exception {
inputProperties.connection.endpoint.setValue(ENDPOINT_SOAP);
inputProperties.connection.clientAccessId.setValue(USERID_SOAP);
inputProperties.connection.secretKey.setValue("false");
MarketoSource source = new MarketoSource();
source.initialize(null, inputProperties);
MarketoClientService client = source.getClientService(null);
fail("Shouldn't be here");
}
use of org.talend.components.marketo.runtime.MarketoSource in project components by Talend.
the class MarketoSOAPClientTestIT method testGetMultipleLeadsLastUpdate.
@Test
public void testGetMultipleLeadsLastUpdate() throws Exception {
inputProperties.inputOperation.setValue(getMultipleLeads);
inputProperties.leadSelectorSOAP.setValue(LastUpdateAtSelector);
inputProperties.updateSchemaRelated();
inputProperties.batchSize.setValue(10);
//
inputProperties.oldestUpdateDate.setValue(DATE_OLDEST_UPDATE);
inputProperties.latestUpdateDate.setValue(DATE_LATEST_UPDATE);
MarketoSource source = new MarketoSource();
source.initialize(null, inputProperties);
MarketoClientService client = source.getClientService(null);
//
assertTrue(client.getMultipleLeads(inputProperties, null).getRecords().size() > 0);
}
use of org.talend.components.marketo.runtime.MarketoSource in project components by Talend.
the class MarketoSOAPClientTestIT method testGetMultipleLeadsLeadKey.
@Test
public void testGetMultipleLeadsLeadKey() throws Exception {
inputProperties.inputOperation.setValue(getMultipleLeads);
inputProperties.leadKeyTypeSOAP.setValue(EMAIL);
inputProperties.afterInputOperation();
inputProperties.batchSize.setValue(100);
inputProperties.leadKeyValues.setValue("undx00@undx.net,undx10@undx.net,undx20@undx.net,undx30@undx.net");
MarketoSource source = new MarketoSource();
source.initialize(null, inputProperties);
MarketoClientService client = source.getClientService(null);
//
MarketoRecordResult result = client.getMultipleLeads(inputProperties, null);
LOG.debug("{}", result);
List<IndexedRecord> records = result.getRecords();
assertTrue(records.size() >= 4);
}
Aggregations