How to unit test asynchronous APIs?
I ran into the same question and found a different solution that works for me. I use the “old school” approach for turning async operations into a sync flow by using a semaphore as follows: // create the object that will perform an async operation MyConnection *conn = [MyConnection new]; STAssertNotNil (conn, @”MyConnection init failed”); … Read more