关于powermock报错org.powermock.reflect.exceptions.FieldNotFoundException: Field 'fTestClass' was not found in class org.junit.internal.runners.MethodValidator.问题解决


 

事件背景

使用PowerMock模拟一个局部变量,添加@RunWith(PowerMockRunner.class)、@PrepareForTest(StudentService.class)注解成功

运行报错如下图:

 

 

 解决方案:

经过度娘发现,是jar包的原因升级就好了

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM