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.

Bug 204918

Summary: Wrong JUnit Library selected on NB Module
Product: java Reporter: gualtiero65
Component: JUnitAssignee: Theofanis Oikonomou <theofanis>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE with shown JUnit 4 library and JUnit 3 source file

Description gualtiero65 2011-11-10 08:52:44 UTC
[ BUILD # : 201111060600 ]
[ JDK VERSION : 1.6.27 ]

In a NetNebeans Module, 

* creating new test file (selecting Java file and Tools --> Create JUnit Test)

* Selecting JUnit 3.x

the 

- Test file is created with JUnit 3.x   (correct!)

- JUnit 4 library is added (wrong! it should be JUnit 3)


In IDE log I found the following message:
WARNING: Project module8: Could not modify set of JUnit libraries - operation
not supported by the project.

but I'm not sure it is relevant.
Comment 1 gualtiero65 2011-11-10 08:53:46 UTC
Created attachment 113074 [details]
IDE with shown JUnit 4 library and JUnit 3 source file
Comment 2 Theofanis Oikonomou 2012-03-28 14:04:40 UTC
I am sorry I cannot reproduce in latest build NetBeans IDE Dev (Build 20120326-142a2031e2c0). 

I used the context menu on the java class as well as the wizard to create test for existing class and they both created a test class and added JUnit 3.8.2 library to the Test Libraries.

Feel free to reopen.
Comment 3 mago_ebon 2012-07-09 23:56:57 UTC
It works correctly on Windows 7, but the bug still occurs in Linux Version (Ubuntu).
Comment 4 Theofanis Oikonomou 2012-10-29 13:02:43 UTC
This is not supported. junit 3 in not available for module development. But junit4 is compatible with junit3. You can create a module wrapping junit3.x and add it as a dependency in your module instead.