Detailed steps for using JUnit with Eclipse

  1. Launch eclipse. If you do not see your bj4 project from assignment 7, follow these steps to set it up.
  2. Add junit to your project classpath:
  3. Add a new file to your project
  4. Add member variable "public Hand testHand"
  5. Add setUp and tearDown methods
  6. Add test methods
  7. Run the tests
  8. Keep adding test methods until you are sure that you have 100% branch coverage of
  9. If you run your junit tests and see error messages that look like "invoke0(Method, Object, Object[])line: not available [native method]" then you need to exit Eclipse and reload it.
example use case templatesample test plan templateProject plan template