iphone - How to unit tests functions which return results asyncronously in XCode? -
I have something like
- (zero) getData: (SomeParameter *) param {// Remotely calls for data returned data via a remote method -} (zero) handleDataDidet method: (NSDT *) data {// handle data returned}
I want to write a unit test for this, how can I do something better than data returned from
NSData * = zero; - (zero) handleDateDataData: (NSDTA *) data {returnData = data; } - (zero) test {[obj getData: param]; While (returned!) {[Entrad gold: 1]; } // Tested on Returned Data
-
Your object Get the getData:
method to call a counterfeit and check that it calls correctly.
-
Call HandleDeliget Method:
Another test method with some ready-baked data and ensures that whatever data it has given Is done with.
Comments
Post a Comment