Search in sources :

Example 1 with EditConnectionListener

use of org.pentaho.di.ui.trans.step.BaseStepDialog.EditConnectionListener in project pentaho-kettle by pentaho.

the class EditConnectionListenerTest method init.

@Before
public void init() {
    dialog = mock(BaseStepDialog.class);
    when(dialog.showDbDialogUnlessCancelledOrValid(anyDbMeta(), anyDbMeta())).thenAnswer(new PropsSettingAnswer(TEST_NAME, TEST_HOST));
    dialog.transMeta = spy(new TransMeta());
    CCombo combo = mock(CCombo.class);
    when(combo.getText()).thenReturn(TEST_NAME);
    editConnectionListener = spy(dialog.new EditConnectionListener(combo));
    doNothing().when(editConnectionListener).showErrorDialog(any(Exception.class));
}
Also used : CCombo(org.eclipse.swt.custom.CCombo) EditConnectionListener(org.pentaho.di.ui.trans.step.BaseStepDialog.EditConnectionListener) TransMeta(org.pentaho.di.trans.TransMeta) KettleException(org.pentaho.di.core.exception.KettleException) IOException(java.io.IOException) Before(org.junit.Before)

Aggregations

IOException (java.io.IOException)1 CCombo (org.eclipse.swt.custom.CCombo)1 Before (org.junit.Before)1 KettleException (org.pentaho.di.core.exception.KettleException)1 TransMeta (org.pentaho.di.trans.TransMeta)1 EditConnectionListener (org.pentaho.di.ui.trans.step.BaseStepDialog.EditConnectionListener)1