mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 08:21:23 +00:00
Issue #309: Added user listing
This commit is contained in:
@@ -7,6 +7,8 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Iterators;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.notNullValue;
|
||||
@@ -145,4 +147,13 @@ public class GitHubTest {
|
||||
assertTrue(ioe.getMessage().contains("private mode enabled"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void listUsers() throws IOException {
|
||||
GitHub hub = GitHub.connect();
|
||||
for (GHUser u : Iterables.limit(hub.listUsers(),10)) {
|
||||
assert u.getName()!=null;
|
||||
System.out.println(u.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user