You have a method that accepts more than 2 parameters - reidev275/SignsYouShouldProbablyRefactor GitHub Wiki
Example
void AddUser(string username, string password, int age)
Why is this bad?
- Logically we should be adding a user object
- If we add another parameter we break the interface and will be forced to change all of the calling code
- Required number of unit tests for argument exceptions is a multiple of the number of parameters
Resolved
void AddUser(IUser userToAdd)
interface IUser
{
string Username { get; set; }
string Password { get; set; }
int Age { get; set; }
}