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 211364 - setUpClass() and tearDownClass() duplicated in generated blank TestNG test
Summary: setUpClass() and tearDownClass() duplicated in generated blank TestNG test
Status: RESOLVED DUPLICATE of bug 214395
Alias: None
Product: java
Classification: Unclassified
Component: TestNG (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-18 06:49 UTC by mienamoo
Modified: 2012-06-20 11:31 UTC (History)
1 user (show)

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 mienamoo 2012-04-18 06:49:44 UTC
NetBeans IDE Dev (Build 201204150400)
JDK 7u3 32-bit

I am working on a Maven-based platform application module, but I don't expect that it will have any influence on this. This only happened the first time I created a test in the module.

Steps to reproduce:

1. Select the module (with no tests or test suites created in it yet).
2. Invoke the New File wizard, choose the Unit Tests category and the TestNG Test Case file type. Click Next.
3. Specify a package and click Finish.
4. The generated test class contained duplicate methods:


    @org.testng.annotations.BeforeClass
    public static void setUpClass() throws Exception {
    }

    @org.testng.annotations.AfterClass
    public static void tearDownClass() throws Exception {
    }



    @BeforeClass
    public void setUpClass() {
    }
    
    @AfterClass
    public void tearDownClass() {
    }
Comment 1 Theofanis Oikonomou 2012-06-20 11:31:07 UTC
I think this should be fixed while handling bug 214395. If it keeps happening please reopen stating whether testng library is in your local repository and perhaps attach a sample project. Thank you

*** This bug has been marked as a duplicate of bug 214395 ***