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 - Wrong JUnit Library selected on NB Module
Summary: Wrong JUnit Library selected on NB Module
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-10 08:52 UTC by gualtiero65
Modified: 2012-10-29 13:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE with shown JUnit 4 library and JUnit 3 source file (108.15 KB, image/png)
2011-11-10 08:53 UTC, gualtiero65
Details

Note You need to log in before you can comment on or make changes to this bug.
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.