lundi 28 mars 2016

How to Mock local variable without using OCMock

I'm writing test cases using XCTest framework provided by apple. I come up with situation where i want to mock local variables allocated inside the function like this below

-(void)myFunction{
   A* a = [[A alloc] init];
}

from my testcase class i want to mock class A inside my function testMyFunction . Is there any way to do it without using OCMock.

Aucun commentaire:

Enregistrer un commentaire