How can you use OCMock with NSURLConnection/delega

2019-07-27 07:57发布

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?

标签: ios ocmock
0条回答
登录 后发表回答