Add method to get the list of languages using in repository

This commit is contained in:
khoa-nd
2015-03-05 15:53:02 +07:00
parent dcc3b7f36b
commit f78530636e
2 changed files with 19 additions and 0 deletions

View File

@@ -43,4 +43,11 @@ public class RepositoryTest extends AbstractGitHubApiTestBase {
private GHRepository getRepository() throws IOException {
return gitHub.getOrganization("github-api-test-org").getRepository("jenkins");
}
@Test
public void listLanguages() throws IOException {
GHRepository r = gitHub.getRepository("kohsuke/github-api");
String mainLanguage = r.getLanguage();
assertTrue(r.listLanguages().containsKey(mainLanguage));
}
}