예제 #1
0
        public void DeleteUserTest(string Auth0id)
        {
            bool result = Auth0APIClient.DeleteUser(Auth0id);

            Assert.IsNotNull(result);
            Assert.IsTrue(result);
        }
예제 #2
0
        public void DeleteUserTest(Users user)
        {
            Auth0APIClient.DeleteUser(user.Auth0Uid);
            var actual = um.DeleteUser(user.UserId);

            Assert.IsTrue(actual);
        }
        public static void UserCleanup()
        {
            UserManager um = new UserManager();

            using (var db = new TicketingSystemDBContext())
            {
                var dbUsers = db.Users.Where(u => u.FullName == "Unit Test User").ToList();
                foreach (Users u in dbUsers)
                {
                    um.DeleteUser(u.UserId);
                }

                var auth0Users = Auth0APIClient.GetAllUsers();
                foreach (var u in auth0Users)
                {
                    if (u.name == "Unit Test User")
                    {
                        Auth0APIClient.DeleteUser(u.user_id);
                    }
                }
            }
        }