public void Valid_Passwords_Must_Have_Atleast_Seven_Figures_And_Contain_Both_Letters_And_Digits() { //Arrange List<Users> user = new List<Users>(); Users t = new Users(); var generatePassword = t.Password(10); var Password = generatePassword; //Act t.ValidPassword(Password); //if (Password.Length < 7 || (!System.Text.RegularExpressions.Regex.IsMatch(Password, "^[a-zA-Z0-9!@#$*%]"))) //{ // throw new Exception(); //} //Assert Assert.IsNotNull(Password); }
public void When_New_User_Added_Generate_Password() { //Arrange List<Users> user = new List<Users>(); Users t = new Users(); user.Add(new Users()); //Act var generatePassword = t.Password(10); var Password = generatePassword; //Assert Assert.IsNotNull(Password); }