use of org.pentaho.di.trans.steps.salesforce.SalesforceStepMeta in project pentaho-kettle by pentaho.
the class SalesforceInputMetaTest method testErrorHandling.
@Test
public void testErrorHandling() {
SalesforceStepMeta meta = new SalesforceInputMeta();
assertFalse(meta.supportsErrorHandling());
}
use of org.pentaho.di.trans.steps.salesforce.SalesforceStepMeta in project pentaho-kettle by pentaho.
the class SalesforceUpdateMetaTest method testErrorHandling.
@Test
public void testErrorHandling() {
SalesforceStepMeta meta = new SalesforceUpdateMeta();
assertTrue(meta.supportsErrorHandling());
}
use of org.pentaho.di.trans.steps.salesforce.SalesforceStepMeta in project pentaho-kettle by pentaho.
the class SalesforceUpsertMetaTest method testErrorHandling.
@Test
public void testErrorHandling() {
SalesforceStepMeta meta = new SalesforceUpsertMeta();
assertTrue(meta.supportsErrorHandling());
}
use of org.pentaho.di.trans.steps.salesforce.SalesforceStepMeta in project pentaho-kettle by pentaho.
the class SalesforceStepDialog method test.
protected void test() {
boolean successConnection = true;
String msgError = null;
SalesforceConnection connection = null;
String realUsername = null;
try {
SalesforceStepMeta meta = META_CLASS.newInstance();
getInfo(meta);
// get real values
String realURL = transMeta.environmentSubstitute(meta.getTargetURL());
realUsername = transMeta.environmentSubstitute(meta.getUsername());
String realPassword = Utils.resolvePassword(transMeta, meta.getPassword());
int realTimeOut = Const.toInt(transMeta.environmentSubstitute(meta.getTimeout()), 0);
connection = new SalesforceConnection(log, realURL, realUsername, realPassword);
connection.setTimeOut(realTimeOut);
connection.connect();
} catch (Exception e) {
successConnection = false;
msgError = e.getMessage();
} finally {
if (connection != null) {
try {
connection.close();
} catch (Exception e) {
/* Ignore */
}
}
}
if (successConnection) {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(BaseMessages.getString(PKG, "SalesforceDialog.Connected.OK", realUsername) + Const.CR);
mb.setText(BaseMessages.getString(PKG, "SalesforceDialog.Connected.Title.Ok"));
mb.open();
} else {
new ErrorDialog(shell, BaseMessages.getString(PKG, "SalesforceDialog.Connected.Title.Error"), BaseMessages.getString(PKG, "SalesforceDialog.Connected.NOK", realUsername), new Exception(msgError));
}
}
use of org.pentaho.di.trans.steps.salesforce.SalesforceStepMeta in project pentaho-kettle by pentaho.
the class SalesforceDeleteMetaTest method testErrorHandling.
@Test
public void testErrorHandling() {
SalesforceStepMeta meta = new SalesforceDeleteMeta();
assertTrue(meta.supportsErrorHandling());
}
Aggregations