Usages of doThrow() doAnswer() doNothing() and doReturn() in mockito

后端 未结 5 1088
庸人自扰
庸人自扰 2020-12-12 16:01

I was learning mockito and I understood the basic usages of the above mentioned functions from the link.

But I would like to know whether it can be used for any othe

5条回答
  •  甜味超标
    2020-12-12 16:47

    If you are testing a logic class and it is calling some internal void methods the doNothing is perfect.

提交回复
热议问题