section: 3.3 tags: lab02 lab title: /Labs/02/Create the Test Class type: text/vnd.tiddlywiki NetBeans can create the basic test class for us: # Right click your `Calculator` class in the <<menu "Projects">> pane and select <<menu "Tools > Create/Update Tests">>. # The default class name should be OK. Set the rest of the options as follows:<div> [[plantuml[ @startsalt { { Location: | ^Test Packages [java] ^ Framework:<U+0lab020> | ^JUnit ^ } { [ ] Integration Tests . {^ "Code Generation" <U+0lab020>{ Method Access Levels <U+20lab02> | Generated Code [X] Public | [X] Test Initializer [X] Protected | [X] Test Finalizer [X] Package Private | [ ] Test Class Initializer . | [ ] Test Class Finalizer . | [ ] Default Method Bodies<U+0lab020> . | . . | Generated Comments . | [ ] Javadoc Comments . | [ ] Source Code Hints } } }<U+0lab020> } @endsalt ]]] <br> These are fairly typical settings for creating test classes. </div> # Click <<menu "OK">>. The test class will be created, and opened.