NotificationFilterSupportTest.java 文件源码

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

项目:freeVM 作者:
/**
 * Test for the method enableType(java.lang.String)
 * 
 * @see javax.management.NotificationFilterSupport#enableType(java.lang.String)
 */
public final void testEnableType() {
    assertNotNull("Notification has not been received!", n);

    // Test exception.
    NotificationFilterSupport f = new NotificationFilterSupport();
    try {
        f.enableType(null);
        fail("IllegalArgumentException not thrown!");
    } catch (Throwable ex) {
        assertTrue("Wrong exception thrown: " + ex,
            (ex instanceof IllegalArgumentException));
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号