use of org.talend.components.marketo.tmarketoinput.TMarketoInputProperties in project components by Talend.
the class MarketoInputReaderTestIT method testLeadSOAPNotFound.
@Test
public void testLeadSOAPNotFound() throws Exception {
TMarketoInputProperties props = getSOAPProperties();
props.inputOperation.setValue(getLead);
props.leadKeyTypeSOAP.setValue(EMAIL);
props.batchSize.setValue(1);
props.afterInputOperation();
String email = EMAIL_INEXISTANT;
props.leadKeyValue.setValue(email);
reader = getReader(props);
assertFalse(reader.start());
}
use of org.talend.components.marketo.tmarketoinput.TMarketoInputProperties in project components by Talend.
the class MarketoInputReaderTestIT method testLeadDynamicSchema.
@Test
public void testLeadDynamicSchema() throws Exception {
TMarketoInputProperties props = getRESTProperties();
props.inputOperation.setValue(getLead);
props.leadKeyTypeREST.setValue(LeadKeyTypeREST.email);
props.batchSize.setValue(1);
props.afterInputOperation();
String email = "undx@undx.net";
props.leadKeyValue.setValue(email);
props.schemaInput.schema.setValue(SchemaBuilder.builder().record("test").prop(SchemaConstants.INCLUDE_ALL_FIELDS, "true").fields().endRecord());
reader = getReader(props);
assertTrue(reader.start());
IndexedRecord r = reader.getCurrent();
assertNotNull(r);
assertTrue(r.getSchema().getFields().size() > 6);
assertFalse(reader.advance());
}
use of org.talend.components.marketo.tmarketoinput.TMarketoInputProperties in project components by Talend.
the class MarketoInputReaderTestIT method testLeadSOAPMany.
@Test
public void testLeadSOAPMany() throws Exception {
TMarketoInputProperties props = getSOAPProperties();
props.inputOperation.setValue(getLead);
props.leadKeyTypeSOAP.setValue(EMAIL);
props.batchSize.setValue(1);
props.afterInputOperation();
String email = EMAIL_LEAD_TEST;
props.leadKeyValue.setValue(email);
reader = getReader(props);
assertTrue(reader.start());
LOG.debug("record = {}.", reader.getCurrent());
// getLead sets remaingCount to 0.
assertFalse(reader.advance());
}
use of org.talend.components.marketo.tmarketoinput.TMarketoInputProperties in project components by Talend.
the class MarketoInputReaderTestIT method testLeadSOAPSingle.
@Test
public void testLeadSOAPSingle() throws Exception {
TMarketoInputProperties props = getSOAPProperties();
props.inputOperation.setValue(getLead);
props.leadKeyTypeSOAP.setValue(EMAIL);
props.batchSize.setValue(10);
props.afterInputOperation();
String email = EMAIL_LEAD_MANY_INFOS;
props.leadKeyValue.setValue(email);
reader = getReader(props);
assertTrue(reader.start());
LOG.debug("record = {}.", reader.getCurrent());
assertFalse(reader.advance());
}
use of org.talend.components.marketo.tmarketoinput.TMarketoInputProperties in project components by Talend.
the class MarketoSOAPClientTestIT method setUp.
@Before
public void setUp() throws Exception {
inputProperties = new TMarketoInputProperties("test");
inputProperties.connection.setupProperties();
inputProperties.connection.endpoint.setValue(ENDPOINT_SOAP);
inputProperties.connection.clientAccessId.setValue(USERID_SOAP);
inputProperties.connection.secretKey.setValue(SECRETKEY_SOAP);
inputProperties.schemaInput.setupProperties();
inputProperties.mappingInput.setupProperties();
inputProperties.includeTypes.setupProperties();
inputProperties.setupProperties();
inputProperties.connection.apiMode.setValue(SOAP);
inputProperties.includeTypes.type.setValue(new ArrayList<String>());
inputProperties.excludeTypes.setupProperties();
inputProperties.excludeTypes.type.setValue(new ArrayList<String>());
inputProperties.connection.setupLayout();
inputProperties.schemaInput.setupLayout();
inputProperties.setupLayout();
//
listProperties = new TMarketoListOperationProperties("test");
listProperties.connection.setupProperties();
listProperties.connection.endpoint.setValue(ENDPOINT_SOAP);
listProperties.connection.clientAccessId.setValue(USERID_SOAP);
listProperties.connection.secretKey.setValue(SECRETKEY_SOAP);
listProperties.schemaInput.setupProperties();
listProperties.setupProperties();
listProperties.connection.apiMode.setValue(SOAP);
listProperties.connection.setupLayout();
listProperties.schemaInput.setupLayout();
listProperties.setupLayout();
//
outProperties = new TMarketoOutputProperties("test");
outProperties.connection.setupProperties();
outProperties.connection.endpoint.setValue(ENDPOINT_SOAP);
outProperties.connection.clientAccessId.setValue(USERID_SOAP);
outProperties.connection.secretKey.setValue(SECRETKEY_SOAP);
outProperties.schemaInput.setupProperties();
outProperties.setupProperties();
outProperties.connection.apiMode.setValue(SOAP);
outProperties.connection.setupLayout();
outProperties.schemaInput.setupLayout();
outProperties.setupLayout();
}
Aggregations