samedi 20 juillet 2019

How does the Mockito Verify method works?

I was searching how to test that something was properly deleted from a database and I found this answer: https://stackoverflow.com/a/38082803/9115438 but it got me thinking,what if the delete method fails and it doesn't actually delete the object,what then? Does the verify method only checks if the delete method was called once or that it was called once and it was succesful? Because if it doesn't check that the delete was succesful then that test is not useful at all.

Aucun commentaire:

Enregistrer un commentaire