It's really common for me to make convenience overloads for methods. Here's an example of something I might do:
public void Encode(string value) {
Encode(value, DefaultEncoding);
}
public void Encode(string value, Encoding encoding) {
// ...
}
I'm starting to pay more attention to unit testing, and testing methods like this introduces some obstacles I'm not sure I trust myself to approach alone. The first and most important problem is whether I should duplicate tests for both overloads. For example, both methods should throw ArgumentNullException if value is null; is it more correct to recognize there could be different logic and write two tests or is it better to assume that the convenience overloads have no logic of their own?
I've also got a secondary problem. My naming scheme is the same as Roy Osherove's: "MemberName_State_ExpectedResult". If I duplicate tests, then I have clashing names without introducing some oddball naming convention. How do you handle this if you duplicate tests?