Testing delegates

11 views
Skip to first unread message

Pedro Gomes

unread,
Nov 5, 2009, 11:48:47 AM11/5/09
to GHUnit
Hi.

I've just successfully integrated GHUnit on an iPhone Project.
Everything seems to be working as expected, so it's time for me to
actually start writing a few tests.

What's the correct approach to test asynchronous calls that typically
rely on delegates to notify you that the work you requested is done?
An example would be an Asynchronous network request.

A few of the classes I need tested rely on delegate calls, that I need
examined to ensure the test passed.
What happens right now, is that the method that triggers the whole
process is called, but because it returns immediately, the test simply
ends, I need to make sure the test only "ends" when the appropriate
methods on the delegate are called.

Any ideas?

Thank you very much.
Best regards.

Pedro Gomes

unread,
Nov 5, 2009, 12:53:11 PM11/5/09
to GHUnit
Nevermind.
Right after I've posted the previous question I found GHAsyncTestCase,
so I'm all set :)
Reply all
Reply to author
Forward
0 new messages