Creating a JUnit testing class
Here's how to create a JUnit testing class:
1. Select the src folder for the project in the Package Explorer pane.
2. Use menu item File --> New --> JUnit Testing Class.
3. The window that opens looks like the image below. Type in a name for the class, something like A2Tester, if the class whose methods are to be tested is named A2
4. Click Finish.
5. If a window opens that says, "JUnit 4 is not on build path. Do you want to add it?", then click the OK button. Library JUnit 4 must be on the build path or the JUnit testing class will not work.
The new class is then placed in the src directory and is opened in the Eclipse editing pane.
You see in the image below that you can fill in a Package name (or it may be filled in if the class is going into a package). Also, the Name of the file may be filled in auautomatically. For CS2110, you don't have to be concerned with other fields in this window.