public void GetFriendDataTest() { User v = ServerAPI.GetFriendData(20); Assert.AreEqual("sxf", v.name); v = ServerAPI.GetFriendData(293); Assert.AreEqual(null, v); }
/// <summary> /// 更新整个好友信息 /// 注意!调用前一定要确保id正确,如果是新构建的,可直接在此附上id号 /// </summary> public void Updata(int id = 0) { if (id != 0) { user_id = id; } var user = ServerAPI.GetFriendData(user_id); if (user != null) { UpdatabyUser(user); } }