public void testTableColumnsNumAndHeader() { final Grid control = getWidget(); final GridColumn[] columns = control.getColumns(); assertEquals(2, columns.length); assertEquals("First Name", columns[0].getText()); // $NON-NLS-1$ assertEquals("Last Name", columns[1].getText()); // $NON-NLS-1$ assertTrue(control.getHeaderVisible()); }
public void testTableColumnsWithNullHeader() { final ITableRidget ridget = getRidget(); final Grid control = getWidget(); control.setHeaderVisible(true); control.getColumn(0).setText("foo"); // $NON-NLS-1$ control.getColumn(1).setText("bar"); // $NON-NLS-1$ final String[] properties1 = new String[] {"firstname", "lastname"}; // $NON-NLS-1$ //$NON-NLS-2$ // null should hide the headers ridget.bindToModel(manager, "persons", Person.class, properties1, null); // $NON-NLS-1$ assertFalse(control.getHeaderVisible()); }