I'm a beginner to Objective-C, but I've used jUnit a fair bit.
For unit testing my code, I need to be able to mock the network, which I'm using through the CFStreamCreatePairWithSocketToHost
function.
Per the answer to How to mock a C-function using OCMock, this is impossible in OCMock. Are there any frameworks or techniques that allow this?
I'd rather not commit to using some overcomplicated Java-esque IoC framework just to make my code easier to test, but I must say that one of the benefits of Spring is that issues like this rarely come up when you use everything through an interface and configure the implementations through dependency injection. Is that the way forward here, or is there a simpler solution?