Search in sources :

Example 1 with RepositoryConnectController

use of org.pentaho.di.ui.repo.controller.RepositoryConnectController in project pentaho-kettle by pentaho.

the class RepositoryConnectControllerTest method setUp.

@Before
public void setUp() {
    controller = new RepositoryConnectController(pluginRegistry, () -> spoon, repositoriesMeta);
    when(pluginInterface.getName()).thenReturn(PLUGIN_NAME);
    when(pluginInterface.getIds()).thenReturn(new String[] { ID });
    when(pluginInterface.getDescription()).thenReturn(PLUGIN_DESCRIPTION);
    List<PluginInterface> plugins = new ArrayList<>();
    plugins.add(pluginInterface);
    when(pluginRegistry.getPlugins(RepositoryPluginType.class)).thenReturn(plugins);
    when(repositoryMeta.getId()).thenReturn(ID);
    when(repositoryMeta.getName()).thenReturn(PLUGIN_NAME);
    when(repositoryMeta.getDescription()).thenReturn(PLUGIN_DESCRIPTION);
}
Also used : PluginInterface(org.pentaho.di.core.plugins.PluginInterface) ArrayList(java.util.ArrayList) RepositoryConnectController(org.pentaho.di.ui.repo.controller.RepositoryConnectController) Before(org.junit.Before)

Example 2 with RepositoryConnectController

use of org.pentaho.di.ui.repo.controller.RepositoryConnectController in project pentaho-kettle by pentaho.

the class RepositorySessionTimeoutHandlerTest method before.

@Before
public void before() {
    repository = mock(ReconnectableRepository.class);
    repositoryConnectController = mock(RepositoryConnectController.class);
    timeoutHandler = new RepositorySessionTimeoutHandler(repository, repositoryConnectController);
}
Also used : ReconnectableRepository(org.pentaho.di.repository.ReconnectableRepository) RepositorySessionTimeoutHandler(org.pentaho.di.ui.repo.timeout.RepositorySessionTimeoutHandler) RepositoryConnectController(org.pentaho.di.ui.repo.controller.RepositoryConnectController) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)2 RepositoryConnectController (org.pentaho.di.ui.repo.controller.RepositoryConnectController)2 ArrayList (java.util.ArrayList)1 PluginInterface (org.pentaho.di.core.plugins.PluginInterface)1 ReconnectableRepository (org.pentaho.di.repository.ReconnectableRepository)1 RepositorySessionTimeoutHandler (org.pentaho.di.ui.repo.timeout.RepositorySessionTimeoutHandler)1