use of org.apache.harmony.beans.tests.support.mock.FakeFox011 in project j2objc by google.
the class IntrospectorTest method testBeanInfo_1.
/*
* Test Introspection with BeanInfo No immediate BeanInfo Have super
* BeanInfo
*/
public void testBeanInfo_1() throws IntrospectionException {
Class<FakeFox011> beanClass = FakeFox011.class;
BeanInfo info = Introspector.getBeanInfo(beanClass);
assertNull(info.getAdditionalBeanInfo());
BeanDescriptor beanDesc = info.getBeanDescriptor();
assertEquals("FakeFox011", beanDesc.getName());
assertEquals(0, info.getEventSetDescriptors().length);
assertEquals(-1, info.getDefaultEventIndex());
assertEquals(0, info.getDefaultPropertyIndex());
MethodDescriptor[] methodDesc = info.getMethodDescriptors();
assertEquals(4, methodDesc.length);
PropertyDescriptor[] propertyDesc = info.getPropertyDescriptors();
assertEquals(2, propertyDesc.length);
for (PropertyDescriptor element : propertyDesc) {
if (element.getName().equals("class")) {
assertNull(element.getWriteMethod());
assertNotNull(element.getReadMethod());
}
}
}
Aggregations