Do everything that makes things more readable for you and your employees, if any. I think it depends on what your other tests are for this class, but based on these two methods, here is what I would do:
Testing methods that test doSomething ():
- doSomething_void_success (it will be some kind of test that checks the successful path)
- doSomething_void_fail (it will be some kind of test that checks the successful path)
- doSomething_void_someOtherTest
Testing methods that test doSomething (String):
- doSomething_String_success
- doSomething_String_fail
- doSomething_String_someOtherTest
I no longer use the test prefix because JUnit 4 does not require it. I just use the @Test annotation
source share