Search in sources :

Example 1 with SpoonSlaveDelegate

use of org.pentaho.di.ui.spoon.delegates.SpoonSlaveDelegate in project pentaho-kettle by pentaho.

the class SharedObjectSyncUtilTest method setUp.

@Before
public void setUp() {
    spoon = mock(Spoon.class);
    // when( spoon.getRepository() ).thenReturn( spoon.rep );
    spoonDelegates = mock(SpoonDelegates.class);
    spoonDelegates.jobs = new SpoonJobDelegate(spoon);
    spoonDelegates.trans = new SpoonTransformationDelegate(spoon);
    spoonDelegates.db = new SpoonDBDelegate(spoon);
    spoonDelegates.slaves = new SpoonSlaveDelegate(spoon);
    spoonDelegates.partitions = new SpoonPartitionsDelegate(spoon);
    spoonDelegates.clusters = new SpoonClustersDelegate(spoon);
    spoon.delegates = spoonDelegates;
    sharedUtil = new SharedObjectSyncUtil(spoon);
    repository = mock(Repository.class);
}
Also used : SpoonSlaveDelegate(org.pentaho.di.ui.spoon.delegates.SpoonSlaveDelegate) SpoonTransformationDelegate(org.pentaho.di.ui.spoon.delegates.SpoonTransformationDelegate) Repository(org.pentaho.di.repository.Repository) SpoonPartitionsDelegate(org.pentaho.di.ui.spoon.delegates.SpoonPartitionsDelegate) SpoonClustersDelegate(org.pentaho.di.ui.spoon.delegates.SpoonClustersDelegate) SpoonDBDelegate(org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate) SpoonDelegates(org.pentaho.di.ui.spoon.delegates.SpoonDelegates) SpoonJobDelegate(org.pentaho.di.ui.spoon.delegates.SpoonJobDelegate) Before(org.junit.Before)

Example 2 with SpoonSlaveDelegate

use of org.pentaho.di.ui.spoon.delegates.SpoonSlaveDelegate in project pentaho-kettle by pentaho.

the class SpoonRefreshSlavesSubtreeTest method setUp.

@Before
public void setUp() throws Exception {
    spoon = mock(Spoon.class);
    spoon.delegates = mock(SpoonDelegates.class);
    spoon.delegates.slaves = new SpoonSlaveDelegate(spoon);
    TreeItem mockItem = mock(TreeItem.class);
    when(spoon.createTreeItem(any(TreeItem.class), anyString(), any(Image.class))).thenReturn(mockItem);
    doCallRealMethod().when(spoon).refreshSlavesSubtree(any(TreeItem.class), any(AbstractMeta.class), any(GUIResource.class));
}
Also used : SpoonSlaveDelegate(org.pentaho.di.ui.spoon.delegates.SpoonSlaveDelegate) GUIResource(org.pentaho.di.ui.core.gui.GUIResource) TreeItem(org.eclipse.swt.widgets.TreeItem) AbstractMeta(org.pentaho.di.base.AbstractMeta) SpoonDelegates(org.pentaho.di.ui.spoon.delegates.SpoonDelegates) Image(org.eclipse.swt.graphics.Image) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)2 SpoonDelegates (org.pentaho.di.ui.spoon.delegates.SpoonDelegates)2 SpoonSlaveDelegate (org.pentaho.di.ui.spoon.delegates.SpoonSlaveDelegate)2 Image (org.eclipse.swt.graphics.Image)1 TreeItem (org.eclipse.swt.widgets.TreeItem)1 AbstractMeta (org.pentaho.di.base.AbstractMeta)1 Repository (org.pentaho.di.repository.Repository)1 GUIResource (org.pentaho.di.ui.core.gui.GUIResource)1 SpoonClustersDelegate (org.pentaho.di.ui.spoon.delegates.SpoonClustersDelegate)1 SpoonDBDelegate (org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate)1 SpoonJobDelegate (org.pentaho.di.ui.spoon.delegates.SpoonJobDelegate)1 SpoonPartitionsDelegate (org.pentaho.di.ui.spoon.delegates.SpoonPartitionsDelegate)1 SpoonTransformationDelegate (org.pentaho.di.ui.spoon.delegates.SpoonTransformationDelegate)1