Search in sources :

Example 1 with TableRowDataPropertyFilter

use of org.eclipse.scout.rt.shared.data.form.fields.tablefield.TableRowDataPropertyFilter in project scout.rt by eclipse.

the class TableRowDataPropertyFilterTest method testTableRowDataPropertyFilter.

@Test
public void testTableRowDataPropertyFilter() throws Exception {
    TableRowDataPropertyFilter propertyFilter = new TableRowDataPropertyFilter();
    FastPropertyDescriptor[] props = BeanUtility.getFastPropertyDescriptors(P_TableRowData.class, AbstractTableRowData.class, propertyFilter);
    Map<String, FastPropertyDescriptor> propertyDescriptorsByName = new HashMap<String, FastPropertyDescriptor>();
    for (FastPropertyDescriptor prop : props) {
        propertyDescriptorsByName.put(prop.getName(), prop);
    }
    assertEquals(3, propertyDescriptorsByName.size());
    assertTrue(propertyDescriptorsByName.containsKey("intColumn"));
    assertTrue(propertyDescriptorsByName.containsKey("booleanColumn"));
    assertTrue(propertyDescriptorsByName.containsKey("objectColumn"));
}
Also used : TableRowDataPropertyFilter(org.eclipse.scout.rt.shared.data.form.fields.tablefield.TableRowDataPropertyFilter) HashMap(java.util.HashMap) FastPropertyDescriptor(org.eclipse.scout.rt.platform.reflect.FastPropertyDescriptor) Test(org.junit.Test)

Aggregations

HashMap (java.util.HashMap)1 FastPropertyDescriptor (org.eclipse.scout.rt.platform.reflect.FastPropertyDescriptor)1 TableRowDataPropertyFilter (org.eclipse.scout.rt.shared.data.form.fields.tablefield.TableRowDataPropertyFilter)1 Test (org.junit.Test)1