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.
Maybe there should be settings for jUnit4 "setUp" and "tearDown" class methods, for classees with @Before(After)Class annotation. See the screenshot. Something like two new checkboxes "Class Test Initialize" and "Class Test Finalizer"? Now every generated test with disabled initializer and finalizer checkboxes contains empty class setUp and class tearDown methods.
Created attachment 52779 [details] class-setup-and-teardown.jpg
Please consider adding this support to 6.5... the needless creation of 2 static methods every time I create a new JUnit case is driving me mad.
*** Issue 161025 has been marked as a duplicate of this issue. ***
Is there a workaround for this? i.e. Is there some way to set the 'classSetUp' and 'classTearDown' variables 'false' by default? Going to "New" -> "JUnit Test" still gives me the boilerplate for @BeforeClass public static void setUpClass() throws Exception { } @AfterClass public static void tearDownClass() throws Exception { } plus the imports import org.junit.AfterClass; import org.junit.BeforeClass;
The two checkboxes are present in latest builds. Please try one. Closing this one. Thank you for reporting