“Mockito's inline mock maker is not supported”运行报错的解决方法
现象描述
运行测试用例失败,报错信息如图1所示。
可能原因
pom.xml文件未添加mockito-inline库。
处理步骤
在pom.xml文件中添加mockito-inline库。
1 2 3 4 5 6 |
<dependency> <groupId>org.mockito</groupId> <artifactId>mockito-inline</artifactId> <version>3.9.0</version> <scope>test</scope> </dependency> |

添加的mockito-inline库版本需要与项目兼容。
父主题: FAQ