lundi 2 février 2015

how to write unit test for nsnotification

I am working in swift, i want to refresh a page so I am sending it using notification, i am posting a notification in one view controller and adding observer in another and it is working perfectly. What i want to do is add unit test to it in swift. I checked many sites but was not able to do it. I am new to swift and don't know where to start.


Basically the working is, when i click the button notification is posted and when the next view controller is loaded the notification observer is added.


How can i do the unit testing


Thanks in advance


Aucun commentaire:

Enregistrer un commentaire