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

Bug 320715

Summary: [JUnit] Renaming unit test class when renaming the class who’s tested
Product: [Eclipse Project] JDT Reporter: Stijn Vanpoucke <stijn.vanpoucke>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: ankur_sharma, daniel_megert, remy.suen
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Stijn Vanpoucke CLA 2010-07-23 09:15:24 EDT
Build Identifier: 20100617-1415

I often use the refactor -> rename... functionality in eclipse, I also have the habit to name my unit test TestedClassNameTest. But when I rename my tested class I must never forget to rename my unitTest, it would be extremely useful to rename my unit test class automaticly when the tested class is renamed.

There's pitty enough no relation in the eclipse model between the junit class and the class who's tested. 

Reproducible: Always

Steps to Reproduce:
1. Click on the class name
2. Press ctrl+shift+r
3. Edit the name of the class.
4. Press enter

Result:
Everything related to that class has been renamed even the JavaDoc, in exception to the class name of the related unit test.

Expected Result:
The name of the unit test who is related to that class is also renamed.
Comment 1 Ankur Sharma CLA 2010-07-23 15:56:44 EDT
Over to JDT
Comment 2 Dani Megert CLA 2010-07-28 06:52:04 EDT

*** This bug has been marked as a duplicate of bug 37937 ***
Comment 3 Dani Megert CLA 2010-07-28 06:54:21 EDT

*** This bug has been marked as a duplicate of bug 44178 ***