//
// Tests
//
////////////////////////////////////////////////////////////////////////////
public void test_parse() throws Exception {
CanvasInfo canvas =
parseJavaInfo(new String[]{
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",
" Canvas canvas = new Canvas();",
" ToolStrip toolStrip = new ToolStrip();",
" toolStrip.setVertical(true);",
" toolStrip.addMember(new Label('New Label'));",
" toolStrip.addResizer();",
" toolStrip.addFormItem(new TextItem('New_TextItem'));",
" toolStrip.addButton(new ToolStripButton('New Button'));",
" toolStrip.addFill();",
" canvas.addChild(toolStrip);",
" toolStrip.setRect(35, 25, 200, 200);",
" canvas.draw();",
" }",
"}"});
canvas.refresh();
// check ToolStrip
ToolStripInfo toolStrip = canvas.getChildren(ToolStripInfo.class).get(0);
assertThat(toolStrip.isHorizontal()).isFalse();
// check children
assertThat(toolStrip.getChildrenReal().size()).isEqualTo(4);
assertThat(toolStrip.getCanvases().length).isEqualTo(4);
List<AbstractComponentInfo> children = toolStrip.getChildren(AbstractComponentInfo.class);