public void UserInfo() { var c = new Crawler(username, pwd); c.PageSize = 500; var list = c.ExecuteUserList(); var failedCount = 0; var count = 0; list.ForEach(u => { count++; if (count % 10 == 0) { //c = new Crawler(username, pwd); } var user = c.ExecuteUserInfo(u.id); if (user != null) { Debug.WriteLine("user:{0}_{1}", user.NickName, user.FakeId); } else { failedCount++; } if (failedCount > 2) { Debug.WriteLine("错误了{0}次,执行了{1}", failedCount, count); Assert.IsFalse(true); } }); //Assert.AreEqual("techdong", user.Username); }
public void UserListTest() { var c = new Crawler(username, pwd); c.PageSize = 500; var list = c.ExecuteUserList(); Assert.AreEqual(51, list.Count); }
public void UserListByOtherGroupTest() { var c = new Crawler(username, pwd); c.PageSize = 500; var list = c.ExecuteUserList(100); list.ForEach(u => Debug.Print("id:{0},nickname:{1},groupid:{2},remark:{3}\n", u.id, u.NickName, u.GroupID, u.RemarkName)); Assert.IsNotNull(list); }