Search in sources :

Example 1 with Result

use of org.talend.components.api.component.runtime.Result in project components by Talend.

the class MarketoWriteOperationTest method testFinalize.

@Test
public void testFinalize() throws Exception {
    List<Result> wr = new ArrayList<Result>();
    wr.add(new Result());
    assertEquals("{successRecordCount=0, rejectRecordCount=0, totalRecordCount=0}", wop.finalize(wr, null).toString());
}
Also used : ArrayList(java.util.ArrayList) Result(org.talend.components.api.component.runtime.Result) Test(org.junit.Test)

Example 2 with Result

use of org.talend.components.api.component.runtime.Result in project components by Talend.

the class MarketoOutputWriteOperationTest method testFinalize.

@Test
public void testFinalize() throws Exception {
    List<Result> wr = new ArrayList<Result>();
    wr.add(new Result());
    assertEquals("{successRecordCount=0, rejectRecordCount=0, totalRecordCount=0}", wop.finalize(wr, null).toString());
}
Also used : ArrayList(java.util.ArrayList) Result(org.talend.components.api.component.runtime.Result) Test(org.junit.Test)

Example 3 with Result

use of org.talend.components.api.component.runtime.Result in project components by Talend.

the class SalesforceTestBase method doWriteRows.

// Returns the rows written (having been re-read so they have their Ids)
protected static void doWriteRows(SalesforceConnectionModuleProperties props, List<IndexedRecord> outputRows) throws Exception {
    SalesforceSink salesforceSink = new SalesforceSink();
    salesforceSink.initialize(adaptor, props);
    salesforceSink.validate(adaptor);
    SalesforceWriteOperation writeOperation = salesforceSink.createWriteOperation();
    Writer<Result> saleforceWriter = writeOperation.createWriter(adaptor);
    writeRows(saleforceWriter, outputRows);
}
Also used : SalesforceWriteOperation(org.talend.components.salesforce.runtime.SalesforceWriteOperation) SalesforceSink(org.talend.components.salesforce.runtime.SalesforceSink) ValidationResult(org.talend.daikon.properties.ValidationResult) Result(org.talend.components.api.component.runtime.Result)

Example 4 with Result

use of org.talend.components.api.component.runtime.Result in project components by Talend.

the class SalesforceReader method getReturnValues.

@Override
public Map<String, Object> getReturnValues() {
    Result result = new Result();
    result.totalCount = dataCount;
    return result.toMap();
}
Also used : Result(org.talend.components.api.component.runtime.Result)

Example 5 with Result

use of org.talend.components.api.component.runtime.Result in project components by Talend.

the class SalesforceServerTimeStampReader method getReturnValues.

@Override
public Map<String, Object> getReturnValues() {
    Result result = new Result();
    result.totalCount = dataCount;
    return result.toMap();
}
Also used : Result(org.talend.components.api.component.runtime.Result)

Aggregations

Result (org.talend.components.api.component.runtime.Result)76 Test (org.junit.Test)42 IndexedRecord (org.apache.avro.generic.IndexedRecord)31 ArrayList (java.util.ArrayList)22 Schema (org.apache.avro.Schema)17 TSalesforceOutputProperties (org.talend.components.salesforce.tsalesforceoutput.TSalesforceOutputProperties)13 ComponentDefinition (org.talend.components.api.component.ComponentDefinition)11 TSalesforceOutputDefinition (org.talend.components.salesforce.tsalesforceoutput.TSalesforceOutputDefinition)11 IOException (java.io.IOException)10 DefaultComponentRuntimeContainerImpl (org.talend.components.api.container.DefaultComponentRuntimeContainerImpl)8 NetSuiteDatasetRuntime (org.talend.components.netsuite.NetSuiteDatasetRuntime)8 NetSuiteSink (org.talend.components.netsuite.NetSuiteSink)8 NetSuiteOutputWriter (org.talend.components.netsuite.output.NetSuiteOutputWriter)8 NetSuiteWriteOperation (org.talend.components.netsuite.output.NetSuiteWriteOperation)8 ValidationResult (org.talend.daikon.properties.ValidationResult)7 NetSuitePortType (com.netsuite.webservices.v2016_2.platform.NetSuitePortType)6 SQLException (java.sql.SQLException)6 List (java.util.List)6 NetSuiteRuntimeImpl (org.talend.components.netsuite.v2016_2.NetSuiteRuntimeImpl)6 NetSuiteSinkImpl (org.talend.components.netsuite.v2016_2.NetSuiteSinkImpl)6