use of com.jcabi.github.Language in project jcabi-github by jcabi.
the class MkRepo method languages.
@Override
public Iterable<Language> languages() {
final List<Language> languages = new ArrayList<Language>(0);
final int java = 999;
languages.add(new RtLanguage("Java", java));
final int php = 888;
languages.add(new RtLanguage("PHP", php));
final int ruby = 777;
languages.add(new RtLanguage("Ruby", ruby));
return languages;
}
use of com.jcabi.github.Language in project jcabi-github by jcabi.
the class MkRepoTest method fetchLanguages.
/**
* Repo can return Languages iterable.
* @throws IOException if some problem inside
*/
@Test
public void fetchLanguages() throws IOException {
final String user = "testuser4";
final Repo repo = new MkRepo(new MkStorage.InFile(), user, new Coordinates.Simple(user, "testrepo4"));
final Iterable<Language> languages = repo.languages();
MatcherAssert.assertThat(languages, Matchers.notNullValue());
MatcherAssert.assertThat(Lists.newArrayList(languages), Matchers.hasSize(Tv.THREE));
}
Aggregations