public void InsertUser_Success() { UserDTO user = new UserDTO(DateTime.Now.ToString(), "username", "email", "picture", "description", 1); var result = UserLogics.InsertUser(user); Assert.AreEqual(true, result); }
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); }
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); }
public void TestInitialize() { UserDTO user1 = new UserDTO(userId, userName, userEmail, "picture1", "description1", 1); var result1 = UserLogics.InsertUser(user1); }