Appendix 1Setting Up JUnit in IntelliJ IDEA and NetBeans
In this appendix you’ll learn how to get JUnit unit tests running in both NetBeans and IntelliJ IDEA. The screenshots and IDE configuration steps you’ll see here supplant those in the Eclipse-based setup instructions starting at Learning JUnit Basics: Our First Passing Test. Note that these instructions cover configuring JUnit from scratch in the IDE and do not presume use of Maven or any other configuration tool.
For either IDE, first set up a Java project as you normally would. Then add the following source. Make sure the package and directories match—both source files should end up in the iloveyouboss package within a source directory named src/iloveyouboss.