Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 378665

Summary: [JUnit][code templates] Generated Javadoc for JUnit tests is wrong according to Javadoc conventions
Product: [Eclipse Project] JDT Reporter: Missing name <eric.lewis>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r
Version: 3.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Missing name CLA 2012-05-07 09:03:06 EDT
Build Identifier: Version: Helios Service Release 1 Build id: 20100917-0705

When generating a JUnit test for a method, the generated Javadoc reads:

/**
 * Test method for {@link ...}.
 */

According to the Javadoc How-to (http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#styleguide) "Method descriptions begin with a verb phrase."

Thus, it should generate
/**
 * Tests {@link ...}.
 */

Ideally, there should be a template for the generated Javadoc.

Reproducible: Always

Steps to Reproduce:
1. Create a JUnit test for a class
2. Check a method to generate a test for that method
Comment 1 Markus Keller CLA 2012-05-16 10:05:31 EDT
We should try to add a new contribution to extension point org.eclipse.ui.editors.templates so that the template appears on the Java > Code Style > Code Templates preference page.

Then, NewTestCaseWizardPageOne#appendMethodComment(..) can use that one.
Comment 2 Eclipse Genie CLA 2020-01-10 07:41:50 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.