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.
1. create a J2SE application project with a main class 2. make the class package private 3. try to create a junit test for it (Tools/Create JUnit Test, choose JUnit 4, confirm the next dialog without changes). 4. two dialogs appear: Class [...] was skipped because it was package private. No tests were created because no testable class was found. 5. the test class is not created. Not sure why package private class is considered untestable - the test class is to be created in the same package, so the original class is accessible from the test. The test generator should not prevent the user from creating a test for a package private class. A workaround is to make the class public temporarily. Product Version: NetBeans IDE Dev (Build jet-main-678-on-090520) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b15 System: Linux version 2.6.21.4-eeepc running on i386; UTF-8; en_US (nb) Userdir: /media/karta/space/userdir
Already fixed. See changeset http://hg.netbeans.org/main/rev/1c5ab8f7d046
If the method org.netbeans.modules.junit.TestabilityResult.filter(TestabilityResult, long) will be fixed according to the Bug 170621 then this bug need to be fixed again, but another way should be used.
Fixed http://hg.netbeans.org/main/rev/6ed2919e6def See also bug 170621