Search in sources :

Example 16 with TransMeta

use of org.pentaho.di.trans.TransMeta in project pentaho-kettle by pentaho.

the class SpoonRefreshClustersSubtreeTest method noClusters.

@Test
public void noClusters() {
    TransMeta meta = mock(TransMeta.class);
    when(meta.getClusterSchemas()).thenReturn(Collections.<ClusterSchema>emptyList());
    callRefreshWith(meta);
    verifyNumberOfNodesCreated(1);
}
Also used : TransMeta(org.pentaho.di.trans.TransMeta) Test(org.junit.Test)

Example 17 with TransMeta

use of org.pentaho.di.trans.TransMeta in project pentaho-kettle by pentaho.

the class SpoonRefreshClustersSubtreeTest method onlyOneMatchesFiltering.

@Test
public void onlyOneMatchesFiltering() {
    when(spoon.filterMatch(eq("2"))).thenReturn(true);
    TransMeta meta = prepareMeta();
    callRefreshWith(meta);
    verifyNumberOfNodesCreated(2);
}
Also used : TransMeta(org.pentaho.di.trans.TransMeta) Test(org.junit.Test)

Example 18 with TransMeta

use of org.pentaho.di.trans.TransMeta in project pentaho-kettle by pentaho.

the class SpoonRefreshClustersSubtreeTest method severalClustersExist.

@Test
public void severalClustersExist() {
    when(spoon.filterMatch(anyString())).thenReturn(true);
    TransMeta meta = prepareMeta();
    callRefreshWith(meta);
    verifyNumberOfNodesCreated(4);
}
Also used : TransMeta(org.pentaho.di.trans.TransMeta) Test(org.junit.Test)

Example 19 with TransMeta

use of org.pentaho.di.trans.TransMeta in project pentaho-kettle by pentaho.

the class SpoonRefreshHopsSubtreeTest method prepareMetaWithThreeHops.

private static TransMeta prepareMetaWithThreeHops() {
    TransMeta meta = mock(TransMeta.class);
    when(meta.nrTransHops()).thenReturn(3);
    for (int i = 0; i < meta.nrTransHops(); i++) {
        TransHopMeta hopMeta = mockHopMeta(i);
        when(meta.getTransHop(eq(i))).thenReturn(hopMeta);
    }
    return meta;
}
Also used : TransMeta(org.pentaho.di.trans.TransMeta) TransHopMeta(org.pentaho.di.trans.TransHopMeta)

Example 20 with TransMeta

use of org.pentaho.di.trans.TransMeta in project pentaho-kettle by pentaho.

the class SpoonRefreshHopsSubtreeTest method onlyOneMatchesFiltering.

@Test
public void onlyOneMatchesFiltering() {
    when(spoon.filterMatch(eq("2"))).thenReturn(true);
    TransMeta meta = prepareMetaWithThreeHops();
    callRefreshWith(meta);
    verifyNumberOfNodesCreated(2);
}
Also used : TransMeta(org.pentaho.di.trans.TransMeta) Test(org.junit.Test)

Aggregations

TransMeta (org.pentaho.di.trans.TransMeta)710 Test (org.junit.Test)289 StepMeta (org.pentaho.di.trans.step.StepMeta)234 Trans (org.pentaho.di.trans.Trans)214 KettleException (org.pentaho.di.core.exception.KettleException)150 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)136 RowMetaAndData (org.pentaho.di.core.RowMetaAndData)117 TransHopMeta (org.pentaho.di.trans.TransHopMeta)115 PluginRegistry (org.pentaho.di.core.plugins.PluginRegistry)109 DummyTransMeta (org.pentaho.di.trans.steps.dummytrans.DummyTransMeta)106 StepInterface (org.pentaho.di.trans.step.StepInterface)76 RowStepCollector (org.pentaho.di.trans.RowStepCollector)73 JobMeta (org.pentaho.di.job.JobMeta)69 ArrayList (java.util.ArrayList)57 DatabaseMeta (org.pentaho.di.core.database.DatabaseMeta)54 PreviewRowsDialog (org.pentaho.di.ui.core.dialog.PreviewRowsDialog)51 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)50 InjectorMeta (org.pentaho.di.trans.steps.injector.InjectorMeta)49 EnterTextDialog (org.pentaho.di.ui.core.dialog.EnterTextDialog)49 TransPreviewProgressDialog (org.pentaho.di.ui.trans.dialog.TransPreviewProgressDialog)49