title: Objective C Unit Test Setup
body: <p>I have been learning Objective C and Xcode for a few months now, and I am trying to setup some unit tests.</p>
  
  <p>All of my projects are OS X "Command Line Tool" Applications.  I use main.m to write code to test the methods and classes I've developed.  That works fine.  I'm trying to migrate to test targets and unit testing.</p>
  
  <p>I am using "<a href="https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/testing_with_xcode/testing_2_testing_basics/testing_2_testing_basics.html" rel="nofollow">Testing with Xcode</a>" as a guide, but I'm having some issues:</p>
  
  <ol>
  <li>When I create a "Test Target", the "Target To Be Tested" field
  defaults to "None", and can't be changed.  Is that okay?</li>
  <li>I am able to run the default tests.  They pass.  But when I create a new test that references a class method that I've written, I get a link error for each class method instance. (not a compile error) </li>
  </ol>
  
  <p>My "ExampleTest.m" test target has an '#import "MyApp.h"', Is there any other setup I need to do?</p>
  
  <p>The "Testing with Xcode" doc shows a setup test method that invokes the ViewController for the app being tested.  I don't have a ViewController for my command line app, and I'm only trying to create unit tests, so I'm not sure how to modify that example...</p>
  
  <p>Bonus Question: I have several classes that I add methods to, and want to reuse.  How do I keep the unit tests with the source code for reuse?  The Test Navigator hierarchy seems to be app-centric.  How to others keep their classes and unit tests for those classes in sync?</p>