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 240091 - Unable to Create JUnit Test for Other or Generated Sources
Summary: Unable to Create JUnit Test for Other or Generated Sources
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-07 17:34 UTC by martinspamer
Modified: 2014-01-08 10:02 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description martinspamer 2014-01-07 17:34:33 UTC
It is not possible to generate JUnit tests for sources in the folders 

-> Other Sources
-> Generated Sources

If a source file in those folders is selected directly then JUnit is absent from the right click Tools menu.

If Project right click menu, New -> JUnit -> "Test for Existing class" is selected.  Then the JUnit wizard does not offer Other Sources or Generated Sources folders to be selected when Browse is choosen.

A Specific example of the need for this is with Code Generated for jaxb2 binding from a schema.  I want to write JUnit tests to validate my schema.
Comment 1 martinspamer 2014-01-07 17:40:37 UTC
Steps to recreate

1) Create Maven project.
2) Download schema e.g. http://examples.oreilly.com/9780596002527/examples/first.xsd
3) Place Schema into Other Sources.
4) Select Project, Right click -> New -> JAXB Bind New Schema
5) Select Schma from Other Sources and finish.
6) Build.
7) Attempt to Create Unit JUnit test for ObjectFactory.java
Comment 2 Theofanis Oikonomou 2014-01-08 10:02:59 UTC
AFAICT this was never supported. At least as far back as 7.1 that I checked. Marking as enhancement. Thank you for reporting