tags:

views:

60

answers:

1

I often use the refactor -> rename functionality in eclipse and I also have the habit of naming the associated unit test TestedClassNameTest. But when I rename my tested class I must not forget to rename my unitTest. It would be extremely useful to rename my unit test automatically when the tested class is renamed.

I guess it wouldn't be that difficult to create a plugin that does the job but maybe that isn't even necessary?

+1  A: 

After several googling and eclipse searches, it seems such feature is not yet available.

Today there is no notion of "class being unit tested" in Eclipse. What I mean here, is that you can create a Unit test classes testing anything you want: a full package, a single class, a single method, a full plugin ....

To get more accurate, there is "NO relation in Eclipse's model" between your tested class and the associated unit test.

I totally agree with you that it would be nice to such a feature in Eclipse. To go further it would be really cool to be able to generate Unit tests skeletons and thus have these tests classes linked to the tested ones.

May be you can laucnh the discussion on Eclipse Buzilla, maybe in the PDE category.

Manu

Manuel Selva
thx, I've reported an enhancement in eclipse's bugzillahttps://bugs.eclipse.org/bugs/post_bug.cgi
Stijn Vanpoucke
Can you please just provide the link to the bug entry you just opened ? This one is the global one to post new entries.
Manuel Selva
Sorry, that's more like it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=320715 Bug #320715
Stijn Vanpoucke
Is there an extension point that will get called when a class is moved/renamed? Because, i'd like to put that in our in-house eclipse plugin.
Stroboskop