public void EditUserPassword_WrongFormatNewPasswordShouldFail() { AddUser addUser = new AddUser(); UserList.GetUserList().AddUserToList(addUser.MakeNewUser("Passwordchange", "Carao", "testcustname", "*****@*****.**", 22, "321Password")); EditUser editUser = new EditUser(); Assert.Throws <ArgumentException>("UserPassword", () => editUser.EditUserPassword("*****@*****.**", "321Password", "badpass")); }
public void EditUserPassword_ShouldChangePassword() { AddUser addUser = new AddUser(); UserList.GetUserList().AddUserToList(addUser.MakeNewUser("Passwordchange", "Carao", "testCustomname121211", "*****@*****.**", 22, "321Password")); EditUser editUser = new EditUser(); editUser.EditUserPassword("*****@*****.**", "321Password", "Password123"); Assert.True(UserList.GetUserList().GetUserWithEmail("*****@*****.**", "Password123").UserFirstName == "Passwordchange"); }