本文整理汇总了Java中org.apache.harmony.beans.tests.support.mock.MockFooSubSub类的典型用法代码示例。如果您正苦于以下问题:Java MockFooSubSub类的具体用法?Java MockFooSubSub怎么用?Java MockFooSubSub使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MockFooSubSub类属于org.apache.harmony.beans.tests.support.mock包,在下文中一共展示了MockFooSubSub类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGetBeanInfoClassint_UseAll_Method
import org.apache.harmony.beans.tests.support.mock.MockFooSubSub; //导入依赖的package包/类
public void testGetBeanInfoClassint_UseAll_Method()
throws IntrospectionException {
BeanInfo info = Introspector.getBeanInfo(MockFooSubSub.class,
Introspector.USE_ALL_BEANINFO);
MethodDescriptor[] mds = info.getMethodDescriptors();
int parentMethodGet = 0;
int parentMethodSet = 0;
for (MethodDescriptor element : mds) {
String name = element.getName();
if (name.startsWith("getText")) {
parentMethodGet++;
assertEquals("getText.MockFooSubBeanInfo", name);
}
if (name.startsWith("setText")) {
parentMethodSet++;
assertEquals("setText.MockFooSubBeanInfo", name);
}
}
assertEquals(1, parentMethodGet);
assertEquals(1, parentMethodSet);
}
示例2: testFlushFromCaches
import org.apache.harmony.beans.tests.support.mock.MockFooSubSub; //导入依赖的package包/类
public void testFlushFromCaches() throws IntrospectionException {
BeanInfo info = Introspector.getBeanInfo(MockFooSubSub.class);
BeanInfo info2 = Introspector.getBeanInfo(MockFooSubSub.class);
assertSame(info, info2);
Introspector.flushFromCaches(MockFooSubSub.class);
BeanInfo info3 = Introspector.getBeanInfo(MockFooSubSub.class);
assertNotSame(info, info3);
}
示例3: testGetBeanInfoClassint_UseAll_Property
import org.apache.harmony.beans.tests.support.mock.MockFooSubSub; //导入依赖的package包/类
public void testGetBeanInfoClassint_UseAll_Property()
throws IntrospectionException {
BeanInfo info = Introspector.getBeanInfo(MockFooSubSub.class,
Introspector.USE_ALL_BEANINFO);
PropertyDescriptor[] pds = info.getPropertyDescriptors();
int parentProperty = 0;
for (PropertyDescriptor element : pds) {
String name = element.getName();
if (name.startsWith("text")) {
parentProperty++;
assertEquals("text.MockFooSubBeanInfo", name);
}
}
assertEquals(1, parentProperty);
}
示例4: testGetBeanInfoClassint_UseAll_Event
import org.apache.harmony.beans.tests.support.mock.MockFooSubSub; //导入依赖的package包/类
public void testGetBeanInfoClassint_UseAll_Event()
throws IntrospectionException {
BeanInfo info = Introspector.getBeanInfo(MockFooSubSub.class,
Introspector.USE_ALL_BEANINFO);
EventSetDescriptor[] esds = info.getEventSetDescriptors();
assertEquals(1, esds.length);
for (EventSetDescriptor element : esds) {
String name = element.getName();
assertEquals("mockPropertyChange.MockFooSubBeanInfo", name);
}
}