use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.
the class CustomPagePresenterTest method testGo.
@Test
public void testGo() throws Exception {
AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class);
arbitraryPagePresenter.go(container);
verify(container).setWidget(eq(arbitraryPageView));
verify(command, times(2)).getCommandLine();
verify(arbitraryPageView).setCommandLine(eq(COMMAND_LINE));
}
use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.
the class SubversionProjectImporterPresenterTest method testGo.
/**
* Test for {@link SubversionProjectImporterPresenter#go(AcceptsOneWidget)}.
*
* @throws Exception if anything goes wrong
*/
@Test
public void testGo() throws Exception {
final String importerDescription = "Some description.";
final AcceptsOneWidget container = mock(AcceptsOneWidget.class);
final ProjectImporterDescriptor projectImporter = mock(ProjectImporterDescriptor.class);
when(projectImporter.getDescription()).thenReturn(importerDescription);
presenter.go(container);
verify(container).setWidget(eq(view));
verify(view).setProjectName(anyString());
verify(view).setProjectDescription(anyString());
verify(view).setProjectUrl(anyString());
verify(view).setInputsEnableState(eq(true));
}
use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.
the class TestResultPresenterTest method methodGoShouldBePerformed.
@Test
public void methodGoShouldBePerformed() {
AcceptsOneWidget container = mock(AcceptsOneWidget.class);
testResultPresenter.go(container);
verify(container).setWidget(view);
}
use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.
the class NodeJsDebuggerConfigurationPagePresenterTest method testGo.
@Test
public void testGo() throws Exception {
AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class);
pagePresenter.go(container);
verify(container).setWidget(eq(pageView));
verify(configuration, atLeastOnce()).getConnectionProperties();
verify(pageView).setScriptPath(anyString());
}
use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.
the class EditorMultiPartStackViewImpl method addPartStack.
@Override
public void addPartStack(@NotNull final EditorPartStack partStack, final EditorPartStack relativePartStack, final Constraints constraints, final double size) {
AcceptsOneWidget partViewContainer = new AcceptsOneWidget() {
@Override
public void setWidget(IsWidget widget) {
if (relativePartStack == null) {
rootView = splitEditorPartViewFactory.create(widget);
splitEditorParts.put(partStack, rootView);
contentPanel.remove(emptyEditorsPanel);
contentPanel.add(rootView);
return;
}
SplitEditorPartView relativePartStackView = splitEditorParts.get(relativePartStack);
if (relativePartStackView == null) {
Log.error(getClass(), "Can not find container for specified editor");
return;
}
relativePartStackView.split(widget, constraints.direction, size);
splitEditorParts.put(partStack, relativePartStackView.getReplica());
splitEditorParts.put(relativePartStack, relativePartStackView.getSpecimen());
}
};
partStack.go(partViewContainer);
}
Aggregations