History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-14669
Type: New Feature New Feature
Status: Open Open
Assignee: Maxim Shafirov
Reporter: Taras Tielkes
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

In JUnit/TestNG tests, "Constant conditions & exceptions" could suggest adding "assertNotNull(...)"

Created: 31 Aug 07 14:33   Updated: 31 Aug 07 15:23
Component/s: Unit Testing. JUnit, Code Analysis. Inspection, Unit Testing. TestNG

Build: 7,241


 Description  « Hide
The assertNotNull() method from JUnit seems to be recognized as doing a non-null check.

However, the "Constant conditions & exceptions" inspection does not offer it as a QuickFix (when I'm inside a JUnit test method).

Actually something similar could be offered for all test frameworks supported by IDEA:

  • JUnit3: simply call assertNotNull() in test superclass
  • JUnit4: insert a call to the (static) method, let code style do a static import if applicable?
  • TestNG: similar to JUnit4, perhaps prefer org.testng.Assert#assertNotNull()


 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.