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 144254 - [65cat] "fix imports" doesn't work for org.junit.Assert.* imports
Summary: [65cat] "fix imports" doesn't work for org.junit.Assert.* imports
Status: RESOLVED DUPLICATE of bug 71249
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-18 12:55 UTC by kawazu428
Modified: 2008-08-19 10:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kawazu428 2008-08-18 12:55:37 UTC
[ BUILD # : 200808170243 ]
[ JDK VERSION : 1.6.0_07 ]

Using JUnit 4.x tests and assert*() / fail() statements, using "Fix
Imports" fails to correctly add the

"...
import static org.junit.Assert.*;
..."

statement to the class source code. Though this import generally is
there while creating a new JUnit 4.x test using the IDE wizard, using
"fix imports" set to remove unused imports subsequently removes this
dependency if not used, but there is no way to automatically
re-introduce it. At least this is rather inconvenient.
Comment 1 Jiri Prox 2008-08-19 10:08:41 UTC
The fix imports/ add import hint does not support static imports yet.
You have to write at least Assert.assert*() then the fix import will work

*** This issue has been marked as a duplicate of 71249 ***