Search in sources :

Example 16 with AcceptsOneWidget

use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.

the class GwtChePagePresenterTest method testGo.

@Test
public void testGo() throws Exception {
    AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class);
    presenter.go(container);
    verify(container).setWidget(eq(view));
    verify(view).setGwtModule(eq(GWT_MODULE));
    verify(view).setCodeServerAddress(eq(CODE_SERVER_ADDRESS));
    verify(view).setClassPath(eq(CHE_CLASS_PATH));
}
Also used : AcceptsOneWidget(com.google.gwt.user.client.ui.AcceptsOneWidget) Test(org.junit.Test)

Example 17 with AcceptsOneWidget

use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.

the class SshKeyManagerPresenterTest method testGo.

@Test
public void testGo() {
    AcceptsOneWidget container = mock(AcceptsOneWidget.class);
    presenter.go(container);
    verify(service).getPairs(Matchers.eq(SshKeyManagerPresenter.VCS_SSH_SERVICE));
    verify(container).setWidget(eq(view));
}
Also used : AcceptsOneWidget(com.google.gwt.user.client.ui.AcceptsOneWidget) Test(org.junit.Test)

Example 18 with AcceptsOneWidget

use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.

the class DebuggerPresenterTest method testGo.

@Test
public void testGo() {
    AcceptsOneWidget container = mock(AcceptsOneWidget.class);
    List<Breakpoint> breakpoints = new ArrayList<>();
    doReturn(breakpoints).when(breakpointManager).getBreakpointList();
    doReturn(container).when(view).getDebuggerToolbarPanel();
    presenter.go(container);
    verify(view).setBreakpoints(breakpoints);
    verify(view).setVariables(any());
    verify(container).setWidget(view);
    verify(debuggerToolbar).go(container);
}
Also used : Breakpoint(org.eclipse.che.ide.api.debug.Breakpoint) ArrayList(java.util.ArrayList) AcceptsOneWidget(com.google.gwt.user.client.ui.AcceptsOneWidget) Test(org.junit.Test) BaseTest(org.eclipse.che.plugin.debugger.ide.BaseTest)

Example 19 with AcceptsOneWidget

use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.

the class NotificationManagerImplTest method testGo.

@Test
public void testGo() throws Exception {
    AcceptsOneWidget container = mock(AcceptsOneWidget.class);
    manager.go(container);
    verify(container).setWidget(eq(view));
}
Also used : AcceptsOneWidget(com.google.gwt.user.client.ui.AcceptsOneWidget) Test(org.junit.Test)

Example 20 with AcceptsOneWidget

use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.

the class GwtPagePresenterTest method testGo.

@Test
public void testGo() throws Exception {
    AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class);
    presenter.go(container);
    verify(container).setWidget(eq(view));
    verify(view).setWorkingDirectory(eq(WORK_DIR));
    verify(view).setGwtModule(eq(GWT_MODULE));
    verify(view).setCodeServerAddress(eq(CODE_SERVER_ADDRESS));
}
Also used : AcceptsOneWidget(com.google.gwt.user.client.ui.AcceptsOneWidget) Test(org.junit.Test)

Aggregations

AcceptsOneWidget (com.google.gwt.user.client.ui.AcceptsOneWidget)27 Test (org.junit.Test)23 IsWidget (com.google.gwt.user.client.ui.IsWidget)3 ProjectImporterDescriptor (org.eclipse.che.api.project.shared.dto.ProjectImporterDescriptor)2 ActivePartChangedEvent (org.eclipse.che.ide.api.event.ActivePartChangedEvent)2 SelectionChangedHandler (org.eclipse.che.ide.api.event.SelectionChangedHandler)2 AbstractPartPresenter (org.eclipse.che.ide.api.parts.AbstractPartPresenter)2 Selection (org.eclipse.che.ide.api.selection.Selection)2 ArrayList (java.util.ArrayList)1 Breakpoint (org.eclipse.che.ide.api.debug.Breakpoint)1 ProcessTreeNode (org.eclipse.che.ide.extension.machine.client.processes.ProcessTreeNode)1 BaseTest (org.eclipse.che.plugin.debugger.ide.BaseTest)1 Matchers.anyString (org.mockito.Matchers.anyString)1 Mockito.anyString (org.mockito.Mockito.anyString)1 Test (org.testng.annotations.Test)1