junit - Guice AbstractModule 的 configure() 方法的 Junit 测试实现
问题描述
我有一个实现configure()
GuiceAbstractModule
类方法的模块。我bind()
在这个方法中的对象实例简单如下:
bind(Command.class)
.annotatedWith(Names.named("commandSpringBean"))
.toProvider(
SpringIntegration.fromSpring(Command.class, "commandSpringBean"));
如何编写 JUnit 来测试此方法?
解决方案
推荐阅读
- javascript - 哪种方法更有效地使用 If 条件?
- swiftui - 为什么初始化列表的滚动位置?
- python - 我得到“模块”对象在 Django Rest Framework 中不可调用
- ruby-on-rails - chart.js 中的自定义标签 x 轴
- javascript - .net Core 在 Javascript 中使用 razor 函数
- python - IndexError:列表索引超出范围 discord.py
- python - 我应该如何在没有任何共享密钥的情况下为 azure 事件中心形成连接字符串
- firebase - 在没有数据库模拟器的数据库上运行 firebase 函数模拟器(而不是面向生产云)
- modelica - OpenModelica 中时间步长大小对结果的影响
- javascript - 使用 multer 上传图片并公开上传。但在 localhost:3000/listing/condo 等路线中没有显示图像