/**
* @see java.beans.beancontext.BeanContextServicesSupport#getService()
*/
public Result testGetService() throws Exception {
context = new BeanContextServicesSupport();
serviceBean = new ServiceBean();
// Adding the component
context.add(serviceBean);
// Listen for new services
context.addBeanContextServicesListener(serviceBean);
TestServiceProvider provider = new TestServiceProvider();
// Add service to the context
context.addService(TestCounter.class, provider);
if ((serviceBean.service instanceof TestCounter))
return passed();
else
return failed("method testGetService");
}
TestBeanContextServicesSupport.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:freeVM
作者:
评论列表
文章目录