This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[ BUILD # : 201011070000 ] [ JDK VERSION : 1.6.14 ] 1. Follow the instructions in TS 68 JUnit (http://wiki.netbeans.org/TS_68_JUnit) to create a JUnit test class for a java class. 2. Modify the generated JUnit test class. 3. Select the Java class and create the JUnit test class again (assume that you are not concentrated and do it by mistake) 4. When clicking on "OK" button of the "Create Test" window, it could show an alert to notify that the JUnit test class already exists instead of silently accepting. FYI : the first generated and modified JUnit test class (at step 2) is not altered after step 4. This is a good thing.
By running the same test under NB Beta 1, I got the following behavior 1. Right-click on Methods.java (for instance) and choose Tools->Create JUnit Tests 2. UNCHECK "Default Method Bodies" then OK to generate the test class ==> the generated test class is correctly generated (and the methods have no default body) 3. Without modifying the previously generated test class, create the test class again for Methods.java. This time CHECK "Default Method Bodies" then OK ==> the generated file seems not to be modified and there are still NO default method bodies.
@comment 1: This should be better communicated to the user. Probably a combination of both requests. Modifying the menu text AND add some info in the test creation dialog. Thus marking this as dublicate. @comment 2: This is expected behavior. The wizard will not touch test methods that already exist in the test class. There is no way to determine if htey were modified since their creation or not. It will only add test methods for any new method in the tested class file. Thank you for reporting *** This bug has been marked as a duplicate of bug 191372 ***