What is the most accepted way to name a unit test method when the target has overloads. Consider these methods:
doSomething();
doSomething(String);
How would you name the corresponding test methods? Would this be the most accepted way?
testDoSomething();
testDoSomethingString();
Do whatever makes things more readable for you and your co-workers, if any. I think it depends on what your other tests for that class are, but based on those two methods, here is what I would do:
Test methods that test doSomething():
Test methods that test doSomething(String):
I don’t use the test prefix anymore, as JUnit 4 doesn’t require it. I just use the @Test annotation