public User GetTestUser(string email = null) { email = string.IsNullOrEmpty(email) ? "*****@*****.**" : email; string password = PasswordGenerator.GenerateRandomPassword(); string hashPwd = HashGenerator.GenerateHash(password); const string firstName = "TestFName"; const string lastName = "TestLName"; string mobile = RandomGenerator.GenerateRandomNumberString(10); string mobileCode = "123456"; //VerificationCodeGenerator.GenerateNewVerificationCode(); string socialAccountId = RandomGenerator.GenerateRandomNumberString(10); string emailCode = VerificationCodeGenerator.GenerateNewVerificationCode(); const string socialAccountType = "Facebook"; var testUser = new User { Email = email, Password = password, HashPassword = hashPwd, FirstName = firstName, LastName = lastName, Mobile = mobile, MobileCode = mobileCode, SocialAccountId = socialAccountId, SocialAccountType = socialAccountType, EmailCode = emailCode }; return testUser; }
internal static void SetTestUser(this TestContext testContext, User user) { testContext.Properties.Add("TestUser", user); }
public void Initialize() { LoginService = new LoginService(); TestUser = TestContextManager.GetTestUser(); }