use of org.pentaho.di.trans.TransMeta in project pentaho-kettle by pentaho.
the class SpoonRefreshHopsSubtreeTest method severalHopsExist.
@Test
public void severalHopsExist() {
when(spoon.filterMatch(anyString())).thenReturn(true);
TransMeta meta = prepareMetaWithThreeHops();
callRefreshWith(meta);
verifyNumberOfNodesCreated(4);
}
use of org.pentaho.di.trans.TransMeta in project pentaho-kettle by pentaho.
the class SpoonRefreshPartitionsSubtreeTest method prepareMetaWithThreeSchemas.
private static TransMeta prepareMetaWithThreeSchemas() {
TransMeta meta = mock(TransMeta.class);
List<PartitionSchema> schemas = asList(mockSchema("1"), mockSchema("2"), mockSchema("3"));
when(meta.getPartitionSchemas()).thenReturn(schemas);
return meta;
}
use of org.pentaho.di.trans.TransMeta in project pentaho-kettle by pentaho.
the class SpoonTest method testTransToRepSaveObjectIdNotNullToFile.
@Test
public void testTransToRepSaveObjectIdNotNullToFile() throws Exception {
TransMeta mockTransMeta = mock(TransMeta.class);
prepareSetSaveTests(spoon, log, mockSpoonPerspective, mockTransMeta, false, false, MainSpoonPerspective.ID, true, true, null, null, false, true);
doCallRealMethod().when(spoon).saveToFile(mockTransMeta);
assertTrue(spoon.saveToFile(mockTransMeta));
verify(mockTransMeta).setRepository(spoon.rep);
verify(mockTransMeta).setMetaStore(spoon.metaStore);
verify(mockTransMeta, never()).setFilename(null);
verify(spoon.delegates.tabs).renameTabs();
verify(spoon).enableMenus();
}
use of org.pentaho.di.trans.TransMeta in project pentaho-kettle by pentaho.
the class SpoonTest method testSetShellTextForTransformationWVersionEnabledNameFileNameNull.
@Test
public void testSetShellTextForTransformationWVersionEnabledNameFileNameNull() {
TransMeta mockTransMeta = mock(TransMeta.class);
Shell mockShell = prepareSetShellTextTests(spoon, mockTransMeta, true, true, false, false, false, true, true, false);
verify(mockShell).setText("Spoon - [RepositoryName] tabName v1.0");
}
use of org.pentaho.di.trans.TransMeta in project pentaho-kettle by pentaho.
the class SpoonTest method testSetShellTextForTransformationWVersionEnabledChanged.
@Test
public void testSetShellTextForTransformationWVersionEnabledChanged() {
TransMeta mockTransMeta = mock(TransMeta.class);
Shell mockShell = prepareSetShellTextTests(spoon, mockTransMeta, true, true, false, false, true, false, false, false);
verify(mockShell).setText("Spoon - [RepositoryName] transformationName v1.0 " + BaseMessages.getString(Spoon.class, "Spoon.Various.Changed"));
}
Aggregations