#98 setUp()/tearDown() methods are not annotated for TestNG

Version 3.0.0.02
closed-fixed
5
2013-04-05
2012-12-11
No

Steps to reproduce:
1. Create the following class: public class Foo {}
2. Press Ctrl+J, in the wizard select TestNG test type and check the setUp() and tearDown() checkboxes
3. Press Finish button.

Expected result:
public class FooTest {
@BeforeMethod
protected void setUp() throws Exception {
}
@AfterMethod
protected void tearDown() throws Exception {
}
}

Actual result:
public class FooTest {
protected void setUp() throws Exception {
}
protected void tearDown() throws Exception {
}
}


Discussion

  • Hmm... Again, I think the code of the original wizard is used and it only generates code for Junit (Junit annotations not being resolved, they are ignored).

     
    • assigned_to: nobody --> ndemengel
    • status: open --> closed-fixed
     
  • Fixed in version 3.0.2