Example #1
0
        public void EditUserPassword_EmptyNewParametersShouldFail(string firstName, string lastName, string customName, string email, int age, string param)
        {
            AddUser  addUser  = new AddUser();
            EditUser editUser = new EditUser();

            UserList.GetUserList().AddUserToList(addUser.MakeNewUser("Lex", "Carao", customName, email, 22, "321Password"));

            Assert.Throws <ArgumentException>(param, () => editUser.EditUserNamesAndAge(email, "321Password", firstName, lastName, age));
        }
Example #2
0
        public void EditUserNamesAndAge_ShouldChangeInfo()
        {
            AddUser addUser = new AddUser();

            UserList.GetUserList().AddUserToList(addUser.MakeNewUser("Lex", "Carao", "testCustomname1", "*****@*****.**", 22, "321Password"));
            EditUser editUser = new EditUser();

            editUser.EditUserNamesAndAge("*****@*****.**", "321Password", "Felix", "Carao", 25);
            Assert.True(UserList.GetUserList().GetUserWithEmail("*****@*****.**", "321Password").UserFirstName == "Felix");
        }