Use Mockito to verify that nothing is called after a method

后端 未结 3 1787
小鲜肉
小鲜肉 2020-12-25 11:04

I\'m using Mockito to write a unit test in Java, and I\'d like to verify that a certain method is the last one called on an object.

I\'m doing something lik

3条回答
  •  长情又很酷
    2020-12-25 11:29

    Not 100% on topic but I was just looking to find the opposite of verify, and this was the only relevant result, it ends up I was after Mockito.verifyZeroInteractions(mock);

    Just incase anyone else ends up here looking for this...

提交回复
热议问题