Search in sources :

Example 21 with TransMeta

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);
}
Also used : TransMeta(org.pentaho.di.trans.TransMeta) Test(org.junit.Test)

Example 22 with TransMeta

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;
}
Also used : PartitionSchema(org.pentaho.di.partition.PartitionSchema) TransMeta(org.pentaho.di.trans.TransMeta)

Example 23 with TransMeta

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();
}
Also used : TransMeta(org.pentaho.di.trans.TransMeta) DummyTransMeta(org.pentaho.di.trans.steps.dummytrans.DummyTransMeta) Test(org.junit.Test)

Example 24 with TransMeta

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");
}
Also used : Shell(org.eclipse.swt.widgets.Shell) TransMeta(org.pentaho.di.trans.TransMeta) DummyTransMeta(org.pentaho.di.trans.steps.dummytrans.DummyTransMeta) Test(org.junit.Test)

Example 25 with TransMeta

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"));
}
Also used : Shell(org.eclipse.swt.widgets.Shell) TransMeta(org.pentaho.di.trans.TransMeta) DummyTransMeta(org.pentaho.di.trans.steps.dummytrans.DummyTransMeta) 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