private void CreateUser(RegisterUserTestData.RegisterUser user) { new SaltedHash().GetHashAndSaltString(user.Password, out var hash, out var salt); var authRepo = AppHost.Container.Resolve <IAuthRepository>(); authRepo.CreateUserAuth(new AppUser { Id = user.Id, DisplayName = "DisplayName", Email = user.Email, UserName = user.Username, PasswordHash = hash, Salt = salt, Roles = user.Roles, Permissions = user.Permissions }, user.Password); }
protected virtual void RegisterAdminUser(RegisterUserTestData.RegisterUser user) { CreateUser(user); }