public void Control_That_Name_And_Password_Is_Viable_Return_False() { Users t = new Users(); var name = t.Name; var password = t.PassWord; Assert.IsFalse("Fakename" == name && "FakeLastName" == password); }
public void Control_That_Name_And_Password_Is_Viable_Return_True() { //Assert //var user = new Tester.Users(); //var name = user.Name; Users t = new Users(); var name = t.Name; var password = t.PassWord; Assert.IsTrue("Abdullah" == name && "Moreno" == password); }
public void Control_That_Name_And_Password_Is_Viable_Return_True() { //Arrange Users t = new Users(); t.Name = "Abdullah"; t.PassWord = "******"; var name = t.Name; var password = t.PassWord; //Assert Assert.IsTrue("Abdullah" == name && "Moreno" == password); }
public void No_Special_Characters_Allowed_In_User_Name() { //Arrange List<Users> user = new List<Users>(); Users t = new Users(); user.Add(new Users()); //Act // if (Name.All(char.IsLetterOrDigit)) //{ // user.Add(new Users()); //} // else // { // throw new FormatException(); // } //Assert Assert.IsFalse(t.Add_User("Bengt").Contains("@#$åäö")); }
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); }