public static Task <HttpResponseMessage> SubmitCreateAccountRequest(AccountCreatePrarams param, string token, string server = "") { var request = new RegisterRequest { UserName = param.Username, ActivateUser = true, AutoConfirmEmail = true, Password = param.Password, Email = param.Email, FirstName = param.FirstName, LastName = param.LastName, PhoneNumber = param.PhoneNumber, ConfirmPassword = param.Password }; return(RestApiHelper.GetHttpClient(token: token, url: server).PostAsJsonAsync("api/identity/user", request)); }
public AccountBuilder() { _accountCreatePrarams = new AccountCreatePrarams { Username = Guid.NewGuid().ToString(), FirstName = System.Environment.MachineName, LastName = System.Environment.UserDomainName, Address = "Vietnam", Email = Guid.NewGuid().ToString() + "@gmail.com", Roles = new List <string> { "Basic" }, Password = DefaultConstants.DefaultPassword, ConfirmPassword = DefaultConstants.DefaultPassword, PhoneNumber = RandomHelper.GetRandomPhoneNumber() }; }