Search in sources :

Example 1 with FakeFox02

use of org.apache.harmony.beans.tests.support.mock.FakeFox02 in project j2objc by google.

the class IntrospectorTest method testBeanInfo_2.

public void testBeanInfo_2() throws IntrospectionException {
    Class<FakeFox02> beanClass = FakeFox02.class;
    BeanInfo info = Introspector.getBeanInfo(beanClass);
    assertNull(info.getAdditionalBeanInfo());
    BeanDescriptor beanDesc = info.getBeanDescriptor();
    assertEquals("FakeFox02", beanDesc.getName());
    assertEquals(0, info.getEventSetDescriptors().length);
    assertEquals(-1, info.getDefaultEventIndex());
    assertEquals(-1, info.getDefaultPropertyIndex());
    PropertyDescriptor[] propertyDesc = info.getPropertyDescriptors();
    for (PropertyDescriptor element : propertyDesc) {
        if (element.getName().equals("fox02")) {
            assertEquals("fox02.beaninfo", element.getDisplayName());
        }
    }
}
Also used : IndexedPropertyDescriptor(java.beans.IndexedPropertyDescriptor) PropertyDescriptor(java.beans.PropertyDescriptor) BeanDescriptor(java.beans.BeanDescriptor) FakeFox02(org.apache.harmony.beans.tests.support.mock.FakeFox02) BeanInfo(java.beans.BeanInfo) SimpleBeanInfo(java.beans.SimpleBeanInfo) FakeFox01BeanInfo(org.apache.harmony.beans.tests.support.mock.FakeFox01BeanInfo)

Aggregations

BeanDescriptor (java.beans.BeanDescriptor)1 BeanInfo (java.beans.BeanInfo)1 IndexedPropertyDescriptor (java.beans.IndexedPropertyDescriptor)1 PropertyDescriptor (java.beans.PropertyDescriptor)1 SimpleBeanInfo (java.beans.SimpleBeanInfo)1 FakeFox01BeanInfo (org.apache.harmony.beans.tests.support.mock.FakeFox01BeanInfo)1 FakeFox02 (org.apache.harmony.beans.tests.support.mock.FakeFox02)1