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.

Bug 62897

Summary: Rename test after renaming method
Product: java Reporter: Jesse Glick <jglick>
Component: JUnitAssignee: junit-issues@java <junit-issues>
Status: RESOLVED FIXED    
Severity: blocker CC: ceklock, mjr_1974
Priority: P3 Keywords: PLAN
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Jesse Glick 2005-08-23 22:40:31 UTC
Would be nice if a rename refactoring for Foo.m1() -> Foo.m2() also offered to
rename FooTest.testM1() -> FooTest.testM2() if it existed. Would mean a dep
junit -> refactoring, I guess.
Comment 1 pribyl 2008-04-30 16:48:17 UTC

*** This issue has been marked as a duplicate of 52960 ***
Comment 2 Theofanis Oikonomou 2013-01-29 16:35:46 UTC
Bug 52960 was fixed but this is still valid.
Comment 3 Theofanis Oikonomou 2013-02-11 09:37:55 UTC
*** Bug 225936 has been marked as a duplicate of this bug. ***
Comment 4 mjr_1974 2013-02-11 13:55:05 UTC
The test method name can also exactly match the renamed test (usually with the @Test annotation).
It is annoying to hunt for the test method each time I rename a method. Think, for example, when you rename a method in an interface! The impact could be in many tests! For the IDE help keeping test and base code in sync should be a must!
Comment 5 Theofanis Oikonomou 2013-02-15 14:39:25 UTC
Changeset: f170236ded95
Author:    Theofanis Oikonomou <theofanis@netbeans.org>
Date:      2013-02-15 15:37
Message:   
Issue #62897 - Rename test after renaming method
Comment 6 Quality Engineering 2013-02-17 01:49:29 UTC
Integrated into 'main-golden', will be available in build *201302162300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f170236ded95
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: Issue #62897 - Rename test after renaming method