public async Task <ResponseData <ValidateUserResult> > RegisterUser(string userName, string userPasswordHash, int?userRoleID, string userFirstName, string userLastName, string userEmail) { ResponseData <ValidateUserResult> responseData = new ResponseData <ValidateUserResult>(); try { List <ValidateUserResult> validateUserResults = await ManageUser.RegisterUser(ConfigurationManager.AppSettings["ConnectionString"], userName, userPasswordHash, userRoleID, userFirstName, userLastName, userEmail); if (validateUserResults == null) { responseData.responseCode = (int)ResponseStatusEnum.DatabaseError; responseData.responseStatusDescription = "Database Error"; } else { responseData.responseCode = (int)ResponseStatusEnum.Success; responseData.responseStatusDescription = "Success"; } responseData.responseResults = validateUserResults; } catch (Exception ex) { Console.WriteLine(ex.Message.ToString()); responseData.responseCode = (int)ResponseStatusEnum.WCFServerError; responseData.responseStatusDescription = "WCF Error"; } return(responseData); }
public void RegisterUserPassingTest() { // Test Account Number var validateUserResult = ManageUser.RegisterUser( ConnectionConst.CORRECTCONNECTIONSTRING, Guid.NewGuid().ToString().Substring(0, 20), "bb96c2fc40d2d54617d6f276febe571f623a8dadf0b734855299b0e107fda32cf6b69f2da32b36445d73690b93cbd0f7bfc20e0f7f28553d2a4428f23b716e90", 1, "Test", "Free", "*****@*****.**").Result; Assert.NotNull(validateUserResult); }