当前位置: 首页>>代码示例>>Java>>正文


Java MockFooSubSub类代码示例

本文整理汇总了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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:23,代码来源:IntrospectorTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:9,代码来源:IntrospectorTest.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:16,代码来源:IntrospectorTest.java

示例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);
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:12,代码来源:IntrospectorTest.java


注:本文中的org.apache.harmony.beans.tests.support.mock.MockFooSubSub类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。