NotificationFilterSupportTest.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:freeVM 作者:
/**
 * Test for the method getEnabledTypes()
 * 
 * @see javax.management.NotificationFilterSupport#getEnabledTypes()
 */
public final void testGetEnabledTypes() {
    NotificationFilterSupport f = new NotificationFilterSupport();
    f.enableType(AttributeChangeNotification.ATTRIBUTE_CHANGE);
    f.enableType(Hello.SAY_HELLO_INVOKED);
    Vector v = f.getEnabledTypes();

    assertTrue("The ATTRIBUTE_CHANGE notification should be enabled!", v
        .contains(AttributeChangeNotification.ATTRIBUTE_CHANGE));
    assertTrue("The SAY_HELLO_INVOKED notification should be enabled!", v
        .contains(Hello.SAY_HELLO_INVOKED));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号