Esempio n. 1
0
        public void DeleteUser_UserNotExists()
        {
            string id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";

            bool deleteResult = UserLogics.DeleteUser(id);

            Assert.AreEqual(true, deleteResult);
        }
Esempio n. 2
0
        public void InsertUser_Duplicate()
        {
            UserDTO user = new UserDTO("duplicate", "username", "email", "picture", "description", 1);

            UserLogics.InsertUser(user);
            var result = UserLogics.InsertUser(user);

            UserLogics.DeleteUser("duplicate");
            Assert.AreEqual(false, result);
        }
Esempio n. 3
0
        public void DeleteUser_Success()
        {
            string  id   = DateTime.Now.ToString();
            UserDTO user = new UserDTO(id, "willbedeleted", "email", "pic", "i will be deleted soon", 1);

            UserLogics.InsertUser(user);

            bool deleteResult = UserLogics.DeleteUser(id);

            Assert.AreEqual(true, deleteResult);
        }
Esempio n. 4
0
 public void TestCleanup()
 {
     UserLogics.DeleteUser(userId);
 }