Ejemplo n.º 1
0
        public void DeleteUser_ShouldWork(string email, string password)
        {
            AddUser  addUser         = new AddUser();
            BaseUser newUsertoDelete = addUser.MakeNewUser("Lex", "Carao", "deletetestscustname1", email, 22, password);

            addUser.AddUserToRepo(newUsertoDelete);
            addUser.AddUserToRepo(addUser.MakeNewUser("Lex", "Carao", "deletetestscustname2", "*****@*****.**", 22, "kobeK911"));
            addUser.AddUserToRepo(addUser.MakeNewUser("Lex", "Carao", "deletetestscustname3", "*****@*****.**", 22, "kosS111be"));
            int expectedSize = UserList.GetUserList().GetSizeOfList() - 1;

            DeleteUser.deleteUser(email, password);
            int actualSize = UserList.GetUserList().GetSizeOfList();

            Assert.True(InputChecker.duplicateEmailcheck(email));
            Assert.Equal(expectedSize, actualSize);
        }
Ejemplo n.º 2
0
        public void MakeNewUser_ShouldCreateAcount()
        {
            AddUser addUser  = new AddUser();
            int     expected = UserList.GetUserList().GetSizeOfList() + 1;

            BaseUser newAccount = addUser.MakeNewUser("Lex", "Carao", "addtestscustname1", "*****@*****.**", 22, "321Password");

            addUser.AddUserToRepo(newAccount);
            int actual = UserList.GetUserList().GetSizeOfList();

            Assert.Equal(UserList.GetUserList().GetUserWithEmail("*****@*****.**", "321Password"), newAccount);
            Assert.Equal(expected, actual);
        }