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);
}
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);
}
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);
}
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;
}
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);
}
Aggregations