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);
}
BeanContextServicesSupportTest.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:freeVM
作者:
评论列表
文章目录