I'm very much new to iPhone app development, so starting with some unit testing. Pardon me if it is trivial question.
I have following code for a text field,
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
//Check whether currently editing text field is a account name text field
if([[_customCellObjects objectAtIndex:0] textField] == textField) {
NSUInteger newLength = [[[_customCellObjects objectAtIndex:0] textField].text length] + [string length] - range.length;
//Return NO(Non Editable) if the account name text field exceeds more than 50 characters
return (newLength > 50) ? NO : YES;
}
else {
//Return YES(Editable) for the other text fields
return YES;
}
}
How to invoke the above method with XCTest? and how to pass parameters to it?