use of org.talend.components.marketo.runtime.client.MarketoClientService in project components by Talend.
the class MarketoInputReaderTestIT method testTDI38956.
@Test
public void testTDI38956() throws Exception {
TMarketoInputProperties props = getRESTProperties();
props.inputOperation.setValue(getLead);
props.leadKeyTypeREST.setValue(email);
props.afterInputOperation();
String email = EMAIL_LEAD_TEST;
props.leadKeyValue.setValue(email);
MarketoSource source = new MarketoSource();
source.initialize(null, props);
MarketoClientService client = source.getClientService(null);
MarketoRecordResult result = client.getLead(props, null);
LOG.debug("{}", result);
List<IndexedRecord> records = result.getRecords();
assertNotEquals(emptyList(), records);
IndexedRecord record = records.get(0);
assertNotNull(record);
// createdAt shouldn't be null
assertNotNull(record.get(4));
// updatedAt shouldn't be null
assertNotNull(record.get(5));
}
Aggregations