Re: Mock the internet
Re: Mock the internet
On 8 Nov 2010, at 09:53, Yung-Luen Lan wrote:
> Hi,
>
> I'm writing a framework for web API like flickr. However, I don't want
> my test failed depending on the server status.
> (And I don't want it hit the server every time I build my project.)
>
> Is there any easy way to "fake" the network layer? I don't think
> swizzle the NSURLConnection is enough because the HTTP intermediate
> framework my project depends use CFNetwork.
> Conditional compile and mocking the response inside the HTTP
> intermediate framework is bad since it's not even my code.
>
During development cannot you not target a local http instance that doesn't support the full API but simply returns an acknowledgment/error response.
A faked network layer doesn't sound appealing.
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden