after upgrade to 2.7 ClassNotFoundException: org.mockito.exceptions.Reporter when run test

前端 未结 4 1541
孤独总比滥情好
孤独总比滥情好 2020-12-10 23:32

I try to set up junit, mokito and powermock together but when I ran a test I get ClassNotFoundException :(

testCompile \'junit:junit:4.12\'
testCompile \'org         


        
4条回答
  •  借酒劲吻你
    2020-12-11 00:19

    PowerMock 1.6 isn't compatible with Mockito 2.7 (take a look at https://github.com/powermock/powermock/wiki/Mockito#supported-versions)

    You should use PowerMock 1.7.0RC2 (or 1.7.0RC3 if 1.7.0RC2 doesn't work), and also use powermock-api-mockito2 instead of powermock-api-mockito.

提交回复
热议问题