title: Unit Testing UITextField Method
body: <p>I'm very much new to iPhone app development, so starting with some unit testing. Pardon me if it is trivial question.</p>
  
  <p>I have following code for a text field,</p>
  
  <pre><code>- (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 &gt; 50) ? NO : YES;
      }
      else {
          //Return YES(Editable) for the other text fields
          return YES;
      }
  }
  </code></pre>
  
  <p>How to invoke the above method with XCTest? and how to pass parameters to it?</p>