Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Anna Kozlova
Subsystem
Unit Testing. TestNG
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Keith Lea
    4 years ago (17 Oct 2007 02:39)
  • Updated by   root
    2 years ago (17 Jan 2010 20:54)
  • Jira: IDEADEV-22665
    (history, comments)
 
IDEA-41587 "Introduce field" with "instantiate in setUp()" ignores existing setUp method and adds TestNG annotation
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
I don't use TestNG. I had a class extending JUnit TestCase, with a setUp method. I did introduce field inside a test method, chose to instantiate in setUp method, and IntelliJ created this method at the end of the file:
  @org.testng.annotations.BeforeMethod
  protected void setUp() throws Exception {
    super.setUp();
    logger = control.createMock(ToolsLogger.class);
  }

The @org.testng... annotation is marked red because I don't use testNG and its libraries are not in the project.

Issue was resolved
Comments (0)
 
History
 
Linked Issues (?)
 
Issue has no comments