I am trying to write unit tests for one of the method in my class. This method makes a server call and passes completion & error block. I know how to make asynchronous server calls from test class but my doubt is how do I test the method which makes the server call with completion & error blocks. Here the intention is to check if the completion & error blocks are handling the server response correctly or not.
If anyone has done this before then please guide. Please correct me if my understanding is not correct.
Aucun commentaire:
Enregistrer un commentaire