mercredi 29 avril 2015

Simulate Button click in View Controller for unit tests Xcode

I have created a Tennis Scorer app in Xcode and I'm now creating unit tests for the app.

When player 1 scores a button is pressed and when player 2 scores a different button is pressed.

How can I simulate these button clicks in my unit tests which are in a separate class?

I can run methods in other classes but cannot connect to the view controller to run methods/button clicks. How can I do this?

Thanks

Aucun commentaire:

Enregistrer un commentaire