Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between verifyNoMoreInteractions and verifyZeroInteractions in Mockito

What is the difference between verifyNoMoreInteractions and verifyZeroInteractions in Mockito? Are the two same method?

like image 862
Sam Li Avatar asked Sep 19 '18 01:09

Sam Li


1 Answers

Apparently, verifyZeroInteractions it is the same as verifyNoMoreInteractions in 2.x:

public static void verifyZeroInteractions(Object... mocks) {
    MOCKITO_CORE.verifyNoMoreInteractions(mocks);
}

But I guess it is going to change in 3.x - https://github.com/mockito/mockito/issues/989

like image 184
khachik Avatar answered Nov 01 '22 04:11

khachik