tags:

views:

8

answers:

0

Hi,

I need to test a method that calls a webservice. So i want to mock the webservice class using OCMock. What i would like to do is tell my mock : when i try to call my webservice just forward the call to the didSucceed method and send it mock datas.

I can forward the call to the success method without problems using :

[[[myMock stub] andCall:@selector(didSucceed:) onObject:service] getDataFromWebService:[OCMArg any]];

But it also forwards the original parameter (the webservice url). How can i forward any call to a fake methods AND give it fake results ?

Thanks, Vincent.