NetBeans

Navigate to the project properties page. Add a test package folder to correspond to the source folder; name it test:

images/netbeans/project_properties.png

Click OK to save the changes, then click File New File… from NetBeans’ main menu to open the New File dialog box:

images/netbeans/new_test_class.png

Select Unit Tests from the list of categories, then select Test for Existing Class from the list of file types. Click the Next button. You’ll see the rather busy New Test for Existing Class dialog box.

Enter the name of the class to test as iloveyouboss.ScoreCollection (or let NetBeans fill in the name by selecting ...

Get Pragmatic Unit Testing in Java 8 with JUnit now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.