IDE project templates are set up with unit testing in mind. Most project types set up a folder for unit tests next to the folder containing your sources. You can have the IDE generate skeleton code for a class's unit test and place it within the test folder with a package structure corresponding to that of the class to be tested. To generate unit test code for a class:
To run the selected project's tests, press Alt-F6 or choose Run | Test "ProjectName". To run a test for a specific file, select the file in the Source Editor or Projects window and press Ctrl-F6 or choose Run | Run File | Test "Filename". |