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.
To make testing in Netbeans TDD easier, can you please add the following 'Code Templates' junit : @${baseType type="org.junit.Test" default="Test" editable="false"} public void ${cursor}() { } testng : @${baseType type="org.testng.annotations.Test" default="Test" editable="false"} public void ${cursor}() { }
FYI: Code seems to be taken from https://gualtierotesta.wordpress.com/2014/03/09/tutorial-how-to-create-a-junit-test-method-template-in-netbeans/
Correct, please can you credit the author. Thanks
(In reply to markiewb from comment #1) > FYI: Code seems to be taken from > https://gualtierotesta.wordpress.com/2014/03/09/tutorial-how-to-create-a- > junit-test-method-template-in-netbeans/ I agree and also voted for this issue. Gualtiero Testa
Created attachment 152870 [details] Proposed patch @Dusan: Please review the patch and apply it. Thank you
Patch integrated. Thanks. http://hg.netbeans.org/jet-main/rev/f6f1b9a15a76
Thanks :)
Integrated into 'main-silver', will be available in build *201503280001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/f6f1b9a15a76 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #251158: Code Templates for JUnit and TestNG - fixed.
Product Version: NetBeans IDE Dev (Build 201504170001) Java: 1.8.0_40; Java HotSpot(TM) 64-Bit Server VM 25.40-b25 Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b25 System: Linux version 3.13.0-24-generic running on amd64; UTF-8; en_US (nb) Thanks Gualtiero for the idea, thanks Benno for the patch and thanks Dusane for the integration! Verified.
The feature works great for JUnit and TestNG. Apologies, but the keyword 'testng' seems natural , but the 'junit' keyword does not since it auto completes to @Test. (My fault) Is it possible to change 'junit' to 'test' ?