AbstractJmxAssemblerTests.java 文件源码

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

项目:spring4-understanding 作者:
@Test
public void testNotificationMetadata() throws Exception {
    ModelMBeanInfo info = (ModelMBeanInfo) getMBeanInfo();
    MBeanNotificationInfo[] notifications = info.getNotifications();
    assertEquals("Incorrect number of notifications", 1, notifications.length);
    assertEquals("Incorrect notification name", "My Notification", notifications[0].getName());

    String[] notifTypes = notifications[0].getNotifTypes();

    assertEquals("Incorrect number of notification types", 2, notifTypes.length);
    assertEquals("Notification type.foo not found", "type.foo", notifTypes[0]);
    assertEquals("Notification type.bar not found", "type.bar", notifTypes[1]);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号