Skip to content

Instantly share code, notes, and snippets.

@whiter4bbit
Created April 25, 2011 05:28
Show Gist options
  • Save whiter4bbit/940198 to your computer and use it in GitHub Desktop.
Save whiter4bbit/940198 to your computer and use it in GitHub Desktop.
GWTTestCase sample
/**
* Test for {@link SearchWidgetUtils}.
*
* @author Pavel Zalunin
*/
public class GwtTestSearchWidgetUtils extends GWTTestCase {
@Override
public String getModuleName() {
return "com.ean.controlpanel.ControlPanel";
}
public void testFillGrid() {
Grid grid = new Grid(2,2);
Widget widget1 = new Button();
Widget widget2 = new Button();
Widget widget3 = new Button();
SearchWidgetUtils.fillGrid(grid, Arrays.asList(widget1, widget2, widget3));
assertEquals(widget1, grid.getWidget(0, 0));
assertEquals(widget2, grid.getWidget(0, 1));
assertEquals(widget3, grid.getWidget(1, 0));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment