Java 单元测试PowerMockito

单元测试报错系列

Cannot instantiate @InjectMocks field named 'contractService'! Cause: the type 'ContractService' is an interface.
You haven't provided the instance at field declaration so I tried to construct the instance.

解决方案:将接口改成实现类

posted @ 2021-03-03 14:27  梦见舟  阅读(1026)  评论(0编辑  收藏  举报