1

I've implemented the code in this posting:how to unit test a NSURLConnection Delegate?

and have managed to get a test case going with my code where I simulate sending a server package of data via the mock classes.

This is ok to test a simple single client post / server response type situation but I want to test a conversation scenario where my code makes a post, the server sends a reply, my code makes another response, the server sends another reply etc.

Has anybody done anything similar to this?

Community
  • 1
  • 1
Gruntcakes
  • 37,738
  • 44
  • 184
  • 378
  • You might find my answer here http://stackoverflow.com/a/16487040/449161 helpful. If you are really focused on 'unit' tests, you should have separate tests that make sure you are sending the right thing to the server and make sure you handle all server responses (that can be done by just calling the delegate method from your test) – Ben Flynn May 13 '13 at 17:30

0 Answers0