I like the unit tests naming convention recommended by Roy Osherove where unit tests look like this:
SomeMethod_Scenario_ExpectedResults
For SomeMethod, there will usually be more test methods that follow this convention and the question is how to deal with SomeMethod rename. I quite don’t like the idea of going through all of the unit tests manually and renaming them one by one.
Is there a tool to help with this? Or maybe this is a weakness of Osherove’s convention and I should go with something like this nested classes approach?
That is somewhat of an edge case which probably isn’t worth changing test naming strategies over.
Global search and replace is the obvious workaround.
Resharper’s renaming functionality can optionally rename related string and comments too but I don’t think it handles substrings inside method names. If it is really important to you then you can always write your own VS plugin to handle this scenario.