If we have this code:
@Test
public void test1(){
Interface1 i1 = mock(Interface1.class)
method1(); // This method calls i1.mockedmethod()
verify(i1, times(1)).mockedmethod();
method1();
verify(i1, times(2)).mockedmethod();
}
I know that it will pass the first verify, but I'm in doubt with the second one. Does verify method counts all the times that the method has been called or it only counts it since the last verify?
Aucun commentaire:
Enregistrer un commentaire