Search in sources :

Example 36 with ProcessTreeNode

use of org.eclipse.che.ide.extension.machine.client.processes.ProcessTreeNode in project che by eclipse.

the class ProcessesPanelPresenterTest method shouldShowCommanOutputWhenCommandSelected.

@Test
public void shouldShowCommanOutputWhenCommandSelected() throws Exception {
    ProcessTreeNode commandNode = mock(ProcessTreeNode.class);
    when(commandNode.getId()).thenReturn(PROCESS_ID);
    presenter.consoles.put(PROCESS_ID, outputConsole);
    presenter.onTreeNodeSelected(commandNode);
    verify(view).showProcessOutput(eq(PROCESS_ID));
    verify(view).setStopButtonVisibility(anyString(), eq(true));
}
Also used : ProcessTreeNode(org.eclipse.che.ide.extension.machine.client.processes.ProcessTreeNode) Test(org.junit.Test)

Aggregations

ProcessTreeNode (org.eclipse.che.ide.extension.machine.client.processes.ProcessTreeNode)36 Test (org.junit.Test)15 ArrayList (java.util.ArrayList)12 IsWidget (com.google.gwt.user.client.ui.IsWidget)8 MachineEntity (org.eclipse.che.ide.api.machine.MachineEntity)8 TerminalPresenter (org.eclipse.che.ide.extension.machine.client.perspective.terminal.TerminalPresenter)5 MachineConfigDto (org.eclipse.che.api.machine.shared.dto.MachineConfigDto)3 OutputConsole (org.eclipse.che.ide.api.outputconsole.OutputConsole)3 CommandOutputConsole (org.eclipse.che.ide.extension.machine.client.outputspanel.console.CommandOutputConsole)3 SubPanel (org.eclipse.che.ide.ui.multisplitpanel.SubPanel)3 Machine (org.eclipse.che.api.core.model.machine.Machine)2 ExtendedMachine (org.eclipse.che.api.core.model.workspace.ExtendedMachine)2 MachineDto (org.eclipse.che.api.machine.shared.dto.MachineDto)2 OperationException (org.eclipse.che.api.promises.client.OperationException)2 CommandOutputConsolePresenter (org.eclipse.che.ide.extension.machine.client.outputspanel.console.CommandOutputConsolePresenter)2 DefaultOutputConsole (org.eclipse.che.ide.extension.machine.client.outputspanel.console.DefaultOutputConsole)2 WidgetToShow (org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow)2 AcceptsOneWidget (com.google.gwt.user.client.ui.AcceptsOneWidget)1 Focusable (com.google.gwt.user.client.ui.Focusable)1 Date (java.util.Date)1