mercredi 6 avril 2016

mockito verify method call inside method

for a unit tests i am trying to verify if there is a way to verify a method call inside a method with mockito verify?

An example would be:

public delete(param) {
    VideoService.deleteVideo(param); << i want to verify the call of this method
    return etc.. 
}

I can check if delete is called with :

verify(mock,times(1)).delete(param);

Is there also like a way to check the inside method like: verify(mock,times(1)).delete(param).VideoService.deleteVideo(param);

Aucun commentaire:

Enregistrer un commentaire