本文整理汇总了Java中org.apache.harmony.beans.tests.support.mock.FakeFox041类的典型用法代码示例。如果您正苦于以下问题:Java FakeFox041类的具体用法?Java FakeFox041怎么用?Java FakeFox041使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FakeFox041类属于org.apache.harmony.beans.tests.support.mock包,在下文中一共展示了FakeFox041类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testProperty
import org.apache.harmony.beans.tests.support.mock.FakeFox041; //导入依赖的package包/类
public void testProperty() throws IntrospectionException {
Class<MockSubClassForPorpertiesStandard> beanClass = MockSubClassForPorpertiesStandard.class;
BeanInfo info = Introspector.getBeanInfo(beanClass);
assertEquals(-1, info.getDefaultEventIndex());
assertEquals(-1, info.getDefaultPropertyIndex());
PropertyDescriptor[] pds = info.getPropertyDescriptors();
for (PropertyDescriptor pd : pds) {
assertFalse(pd.isBound());
assertFalse(pd.isConstrained());
assertFalse(pd.isExpert());
assertFalse(pd.isHidden());
assertFalse(pd.isPreferred());
}
assertEquals(2, info.getPropertyDescriptors().length);
BeanInfo dummyInfo = Introspector.getBeanInfo(FakeFox041.class);
PropertyDescriptor[] p = dummyInfo.getPropertyDescriptors();
assertFalse(p[0].isBound());
assertFalse(p[0].isConstrained());
assertFalse(p[1].isBound());
assertFalse(p[1].isConstrained());
assertTrue(p[2].isBound());
assertTrue(p[2].isConstrained());
dummyInfo = Introspector.getBeanInfo(FakeFox0411.class);
p = dummyInfo.getPropertyDescriptors();
assertFalse(p[0].isBound());
assertFalse(p[0].isConstrained());
assertFalse(p[1].isBound());
assertFalse(p[1].isConstrained());
assertTrue(p[2].isBound());
assertFalse(p[2].isConstrained());
assertTrue(p[3].isBound());
assertTrue(p[3].isConstrained());
dummyInfo = Introspector.getBeanInfo(FakeFox0411.class, FakeFox041.class);
p = dummyInfo.getPropertyDescriptors();
assertFalse(p[0].isBound());
assertFalse(p[0].isConstrained());
}