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.
When you add a method to the class you want to test and try to regenerate junit chnages (new method) is not generated on the first attempt, you must try to regenerate twice to get the corect result Steps: 1) Create junit test from a class 2) Add a method to the class 3) try to create test again (regenerate) - nothing happens 4) try to create test again (regenerate) - new method is added to the test
Fixed. Pretty big fix, should be tested properly. generation of startUp and tearDown should work as well
forgot to mark it as fixed
seems that it works but the generated code is strange -the default is everywhere in switch and the generated test method... <generated code> /* * /*Test of testLukasovaNovaMetoda method, of class DifferentReturnTypes.*/ */ public void testLukasovaNovaMetoda() throws AssertionFailedException { System.out.println("LukasovaNovaMetoda"); DifferentReturnTypes instance = new DifferentReturnTypes(); instance.LukasovaNovaMetoda(); fail("The test case is a prototype."); } public void test(int testNumber) throws Throwable { switch (testNumber) { default: testDoubleMethod(); break; default: testShortMethod(); break; default: testFloatMethod(); break; default: testIntegerMethod(); break; default: testBooleanMethod(); break; default: testByteMethod(); break; default: testLukasovaNovaMetoda(); break; default: testVoidMethod(); break; default: testIntMethod(); break; default: testObjectMethod(); break; default: testLongMethod(); break; default: testStringMethod(); break; default: testCharMethod(); break; default: testIntArrayMethod(); break; default: testAJesteNovejsiMetoda(); break; default: break; } } </generated code>
Known behaviour, problem is in retouche. They have an P2 issue opened for that *** This issue has been marked as a duplicate of 113313 ***
verified duplicate