//
// Tests
//
////////////////////////////////////////////////////////////////////////////
public void test_noSizeInvocations() throws Exception {
WidgetInfo panel =
parseJavaInfo(
"// filler filler filler filler filler",
"public class Test extends HorizontalPanel {",
" public Test() {",
" }",
"}");
panel.refresh();
// initial size
{
Rectangle bounds = panel.getBounds();
assertEquals(450, bounds.width);
assertEquals(300, bounds.height);
}
// set bounds
int newWidth = 500;
int newHeight = 350;
panel.getTopBoundsSupport().setSize(newWidth, newHeight);
assertEditor(
"// filler filler filler filler filler",
"public class Test extends HorizontalPanel {",
" public Test() {",
" }",
"}");
// check that size applied
panel.refresh();
{
Rectangle bounds = panel.getBounds();
assertEquals(newWidth, bounds.width);
assertEquals(newHeight, bounds.height);
}
}