" }",
"}");
}
public void test_setSize_String() throws Exception {
WindowInfo window =
parseJavaInfo(
"public class Test extends Window {",
" public Test() {",
" setSize('350px', '250px');",
" }",
"}");
window.refresh();
// source size
{
Rectangle bounds = window.getBounds();
assertEquals(350, bounds.width);
assertEquals(250 + HEIGHT_DELTA, bounds.height);
}
// set new size
{
window.getTopBoundsSupport().setSize(400, 200);
window.refresh();
// check source
assertEditor(
"public class Test extends Window {",
" public Test() {",
" setSize('400px', '200px');",
" }",
"}");
// check values
Rectangle bounds = window.getBounds();
assertEquals(400, bounds.width);
assertEquals(200 + HEIGHT_DELTA, bounds.height);
}
}