How can you use OCMock with NSURLConnection/delegate for a series of mock network connections?

自闭症网瘾萝莉.ら 提交于 2019-12-11 08:14:17

问题


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?

来源:https://stackoverflow.com/questions/16472878/how-can-you-use-ocmock-with-nsurlconnection-delegate-for-a-series-of-mock-networ

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!