title: Unit-tests and validation logic
body: <p>I am currently writing some unit tests for a business-logic class that includes validation routines. For example:</p>
  
  <pre><code>public User CreateUser(string username, string password, UserDetails details)
  {
      ValidateUserDetails(details);
      ValidateUsername(username);
      ValidatePassword(password);
  
      // create and return user
  }
  </code></pre>
  
  <p>Should my test fixture contain tests for every possible validation error that can occur in the Validate* methods, or is it better to leave that for a separate set of tests? Or perhaps the validation logic should be refactored out somehow?</p>
  
  <p>My reasoning is that if I decide to test for all the validation errors that can occur within CreateUser, the test fixture will become quite bloated. And most of the validation methods are used from more than one place...</p>
  
  <p>Any great patterns or suggestions in this case?</p>