public GetUser ( string username ) : |
||
username | string | |
Результат |
public void UpdateUserServerTests() { DataManager target = new DataManager(); target.CleanForumData(); User userTemp = new User("user", "user"); target.AddUser(userTemp); target.AddSubforum(new Subforum("subforumName")); User user = target.GetUser("user"); user.Password = "******"; bool actual; actual = target.UpdateUser(user); Assert.IsTrue(actual); Assert.AreEqual(user.Password, target.GetUser("user").Password); target.RemoveSubforum("subforumName"); }
public void AddUserServerTests() { DataManager target = new DataManager(); target.CleanForumData(); User user = new User("user2", "user2"); target.AddUser(user); User user2 = target.GetUser("user2"); Assert.AreEqual(user.Username, user2.Username); Assert.AreEqual(user.Password, user2.Password); target.CleanForumData(); }