I have a UIColor category that has a class method
+(UIColor *)appropriateTextColorForBackground:(UIColor *)background
{
//...get brightness value
if (brightness > 127.5f)
return [UIColor blackColor];
else
return [UIColor whiteColor];
}
I want to test with OCMockito using this in my test class
-(void)testAppropriateColorWithBlackShouldReturnWhiteColor
{
Class color = mockClass([UIColor class]);
[color appropriateTextColorForBackground:black];
assertThat([color testColorWithColor:black], is([UIColor whiteColor]));
}
but I get the error
test failure: -: *** -[NSProxy doesNotRecognizeSelector:appropriateTextColorForBackground:] called!
what am I missing? it seems that this should work