BeanContextServicesSupportTest.java 文件源码

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

项目:cn1 作者:
public void testFireServiceRevokedBeanContextServiceRevokedEvent() {
    MockBeanContextServicesSupport support = new MockBeanContextServicesSupport();
    MockBeanContextServicesSupport childSupport = new MockBeanContextServicesSupport();
    support.add(childSupport);
    MockBeanContextServicesListener l1 = new MockBeanContextServicesListener();
    MockBeanContextServicesListener l2 = new MockBeanContextServicesListener();
    support.addBeanContextServicesListener(l1);
    childSupport.addBeanContextServicesListener(l2);
    support.records.assertRecord("initialize", null);
    childSupport.records.assertRecord("initialize", null);

    BeanContextServiceRevokedEvent evt = new BeanContextServiceRevokedEvent(
            support, Collection.class, false);
    support.publicFireServiceRevoked(evt);

    support.records.assertEndOfRecords();
    childSupport.records.assertEndOfRecords();
    assertSame(evt, l1.lastRevokedEvent);
    assertNull(l2.lastRevokedEvent);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号