//
// Tests
//
////////////////////////////////////////////////////////////////////////////
public void test_parse() throws Exception {
PanelInfo panel =
parseJavaInfo(
"public class Test extends Panel {",
" public Test() {",
" setLayout(new BorderLayout());",
" {",
" Label label = new Label();",
" add(label, new BorderLayoutData(RegionPosition.CENTER));",
" }",
" }",
"}");
assertHierarchy(
"{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new BorderLayout())/ /add(label, new BorderLayoutData(RegionPosition.CENTER))/}",
" {new: com.gwtext.client.widgets.layout.BorderLayout} {empty} {/setLayout(new BorderLayout())/}",
" {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /add(label, new BorderLayoutData(RegionPosition.CENTER))/}",
" {new: com.gwtext.client.widgets.layout.BorderLayoutData} {empty} {/add(label, new BorderLayoutData(RegionPosition.CENTER))/}");
WidgetInfo label = panel.getChildrenWidgets().get(0);
BorderLayoutDataInfo layoutData = BorderLayoutInfo.getBorderData(label);
assertNotNull(layoutData);
// check position
assertEquals("center", layoutData.getPosition());
}