Difference between verifyNoMoreInteractions and verifyZeroInteractions in Mockito

Viewed 2700

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

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

Related