How to use Mockito to show all invocations on a mock

前端 未结 2 798
感动是毒
感动是毒 2020-12-30 19:35

I have a unit test that is failing and I\'m unsure why. I want to be able to see all invocations on the mock that occur in the System Under Test. This is not the behavior th

2条回答
  •  情书的邮戳
    2020-12-30 19:55

    This feature is builtin since Mockito 1.9.5. Just use

    mock(ClassToMock.class, withSettings().verboseLogging())
    

提交回复
热议问题