I configured OCMock to my static class library and I created simple method like this.
#import "IOSExample.h"
@implementation IOSExample
-(NSString *)MyTest
{
return @"Nuwanga";
}
-(int *)MyAge
{
int a=5;
int b=5;
int product=a*b;
return product;
}
@end
In OCUnit test I created this method like bellow.
-(void)testMyAge
{
int a=5;
int b=5;
int product=a*b;
STAssertTrue((product > 0), @"The Product was less than zero");
}
My problem is How can I create return type test method in OCMock unit test ???
Thankz