public void Target() { var user = new ServerUser() { Nick = "nickhere" }; Assert.AreEqual("nickhere", user.Nick); Assert.AreEqual("nickhere", user.Target); }
private ServerUser UserOrNew(string nick) { var existing = users.ContainsKey(nick) ? users[nick] : null; if(existing != null) { return existing; } var user = new ServerUser { Nick = nick }; return user; }