Search in sources :

Example 11 with XulLoader

use of org.pentaho.ui.xul.XulLoader in project pdi-dataservice-server-plugin by pentaho.

the class DataServiceRemapStepChooserDialogTest method testInitXul.

@Test
public void testInitXul() throws KettleException, XulException {
    Shell shell = mock(Shell.class);
    XulLoader xulLoader = mock(XulLoader.class);
    XulRunner xulRunner = mock(XulRunner.class);
    XulDomContainer xulDomContainer = mock(XulDomContainer.class);
    when(xulLoader.loadXul(anyString(), any(ResourceBundle.class))).thenReturn(xulDomContainer);
    DataServiceRemapStepChooserDialog dialog = mock(DataServiceRemapStepChooserDialog.class);
    when(dialog.initXul(shell, xulLoader, xulRunner)).thenCallRealMethod();
    dialog.initXul(shell, xulLoader, xulRunner);
    verify(xulLoader).setOuterContext(shell);
    verify(xulLoader).registerClassLoader(any(ClassLoader.class));
    verify(xulRunner).addContainer(xulDomContainer);
    verify(xulRunner).initialize();
}
Also used : Shell(org.eclipse.swt.widgets.Shell) XulLoader(org.pentaho.ui.xul.XulLoader) ResourceBundle(java.util.ResourceBundle) XulDomContainer(org.pentaho.ui.xul.XulDomContainer) XulRunner(org.pentaho.ui.xul.XulRunner) Test(org.junit.Test)

Aggregations

ResourceBundle (java.util.ResourceBundle)11 XulDomContainer (org.pentaho.ui.xul.XulDomContainer)11 XulLoader (org.pentaho.ui.xul.XulLoader)11 KettleXulLoader (org.pentaho.di.ui.xul.KettleXulLoader)8 ToolBar (org.eclipse.swt.widgets.ToolBar)7 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)7 Shell (org.eclipse.swt.widgets.Shell)4 Test (org.junit.Test)4 XulSpoonResourceBundle (org.pentaho.di.ui.spoon.XulSpoonResourceBundle)4 XulRunner (org.pentaho.ui.xul.XulRunner)4 KettleException (org.pentaho.di.core.exception.KettleException)2 FormData (org.eclipse.swt.layout.FormData)1 Control (org.eclipse.swt.widgets.Control)1 KettleStepException (org.pentaho.di.core.exception.KettleStepException)1 KettleValueException (org.pentaho.di.core.exception.KettleValueException)1 SwtXulRunner (org.pentaho.ui.xul.swt.SwtXulRunner)1