/// <summary>
 /// Converts the user entered data into a User object.
 /// </summary>
 /// <param name="encryption">Business class used to encrypt
 /// the password entered by the user.</param>
 /// <returns>User object made up of this data.</returns>
 public virtual User ToUser(IEncryption encryption)
 {
     var user = new User();
     user.Username = Username;
     user.SetPassword(encryption.Encrypt(Password));
     return user;
 }
        public void SetPassword_ShouldSetPasswordSalt()
        {
            var password = new Encryption().Encrypt("password");
            var user = new User();
            user.SetPassword(password);

            Assert.That(user.PasswordSalt, Is.EqualTo(password.Salt));
        }