public void MOCKUserTests() { int userID = 1; string username = "******"; UserType userType = UserType.ADMIN; var user = new MOCKUser(userID, username, userType); Assert.AreEqual(userID, user.GetUserID()); Assert.AreEqual(username, user.GetUsername()); Assert.AreEqual(userType, user.GetUserType()); }
public void MOCKFileHandlerAddDeleteDentistTests() { var mockFileHandler = new MOCKFileHandler(); int userID = 100; string username = "******"; UserType userType = UserType.ADMIN; User newUser = new MOCKUser(userID, username, userType); mockFileHandler.AddExistingUser(newUser); var user = mockFileHandler.GetDentist(userID); Assert.AreEqual(userID, user.GetUserID()); Assert.AreEqual(username, user.GetUsername()); Assert.AreEqual(userType, user.GetUserType()); mockFileHandler.DeleteDentist(userID); var users = mockFileHandler.GetDentists(); Assert.IsFalse(users.ContainsKey(userID)); }