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.
To support creation of both JUnit 3 and JUnit 4 tests, the project should have both JUnit 3 and JUnit 4 test libraries on test classpath. Currently, only library JUnit 3.8.2 is present. I will attach a patch that fixes this issue. If both JUnit libraries are present on the classpath, the user will be asked about the desired version of JUnit to be used (JUnit 3 or JUnit 4) upon first invocation of the "Create JUnit Tests" action on the project. After the user confirms his/her choice, the JUnit module tries to modify the set of project's properties such that only one library (the one corresponding to the chosen JUnit version) remains on the classpath. Here is another issue for which I do not have any solution for now: The Application Client project type does not support modification of the test classpath using method ProjectClassPathModifier.removeLibraries(...) - an UnsupportedOperationException is thrown instead.
Created attachment 48397 [details] patch for adding JUnit 4 library to test classpath
Patch applied, please verify. Thank you. Checking in src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java; /cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java,v <-- AppClientProjectGenerator.java new revision: 1.16; previous revision: 1.15 done
Verified in build 070920.