mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
rtyler no longer has 50 people he follows
This commit is contained in:
@@ -14,17 +14,17 @@ public class UserTest extends AbstractGitHubApiTestBase {
|
||||
public void listFollowsAndFollowers() throws IOException {
|
||||
GHUser u = gitHub.getUser("rtyler");
|
||||
assertNotEquals(
|
||||
count50(u.listFollowers()),
|
||||
count50(u.listFollows()));
|
||||
count30(u.listFollowers()),
|
||||
count30(u.listFollows()));
|
||||
}
|
||||
|
||||
private Set<GHUser> count50(PagedIterable<GHUser> l) {
|
||||
private Set<GHUser> count30(PagedIterable<GHUser> l) {
|
||||
Set<GHUser> users = new HashSet<GHUser>();
|
||||
PagedIterator<GHUser> itr = l.iterator();
|
||||
for (int i=0; i<50 && itr.hasNext(); i++) {
|
||||
for (int i=0; i<30 && itr.hasNext(); i++) {
|
||||
users.add(itr.next());
|
||||
}
|
||||
assertEquals(50, users.size());
|
||||
assertEquals(30, users.size());
|
||||
return users;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user