/**
* Test for removing last column.
*/
public void test_columns_DELETE_asArray() throws Exception {
ComplexPanelInfo panel =
parseJavaInfo(
"import java.util.Arrays;",
"import com.extjs.gxt.ui.client.store.*;",
"import com.extjs.gxt.ui.client.widget.grid.*;",
"public class Test extends com.google.gwt.user.client.ui.HorizontalPanel {",
" public Test() {",
" {",
" ColumnConfig column = new ColumnConfig();",
" Grid grid = new Grid(new ListStore(), new ColumnModel(Arrays.asList(column)));",
" add(grid);",
" }",
" }",
"}");
panel.refresh();
GridInfo grid = getJavaInfoByName("grid");
ColumnConfigInfo column = getJavaInfoByName("column");
//
assertThat(column.canDelete()).isTrue();
column.delete();
panel.refresh();
//
assertNoLoggedExceptions();
assertNoErrors(grid);
assertEditor(
"import java.util.Arrays;",