how to verify a method of a non-mock object is called?

后端 未结 2 1010
南方客
南方客 2020-12-25 09:35

It seems mockito only verifies whether a method of a mock object is called and the mock object always have something like doReturn().when(mock object)

B

2条回答
  •  误落风尘
    2020-12-25 09:42

    Annotate the non-mock object with @Spy annotation and then check for verify(). Check this

提交回复
热议问题