PowerMock + Mockito VS Mockito alone

前端 未结 5 891
半阙折子戏
半阙折子戏 2021-01-30 01:15

Can anyone please summarize, what exactly features gives you adding PowerMock on top of the Mockito?

So far I\'ve found these:

  • mock static, final and priva
5条回答
  •  醉话见心
    2021-01-30 02:19

    One more feature of PowerMock is that we can mock construction of new objects in a method. It is helpful when we cannot change the code of the method to be tested.

提交回复
热议问题