use of com.jcabi.github.Repo in project jcabi-github by jcabi.
the class MkPullTest method pullRequest.
/**
* Create a pull request to work with.
* @return Repo
* @throws Exception If some problem inside
*/
private static Pull pullRequest() throws Exception {
final Repo rpo = MkPullTest.repo();
final MkBranches branches = (MkBranches) (rpo.branches());
branches.create(MkPullTest.BASE, "e11f7ffa797f8422f016576cb7c2f5bb6f66aa51");
branches.create(MkPullTest.HEAD, "5a8d0143b3fa9de883a5672d4a1f44d472657a8a");
return rpo.pulls().create("Test PR", MkPullTest.HEAD, MkPullTest.BASE);
}
use of com.jcabi.github.Repo in project jcabi-github by jcabi.
the class MkRepoTest method fetchCommits.
/**
* Repo can fetch its commits.
*
* @throws IOException if some problem inside
*/
@Test
public void fetchCommits() throws IOException {
final String user = "testuser";
final Repo repo = new MkRepo(new MkStorage.InFile(), user, new Coordinates.Simple(user, "testrepo"));
MatcherAssert.assertThat(repo.commits(), Matchers.notNullValue());
}
use of com.jcabi.github.Repo in project jcabi-github by jcabi.
the class MkRepoTest method fetchNotifications.
/**
* Repo can return Notifications API.
* @throws IOException if some problem inside
*/
@Test
public void fetchNotifications() throws IOException {
final String user = "testuser3";
final Repo repo = new MkRepo(new MkStorage.InFile(), user, new Coordinates.Simple(user, "testrepo3"));
MatcherAssert.assertThat(repo.notifications(), Matchers.notNullValue());
}
use of com.jcabi.github.Repo in project jcabi-github by jcabi.
the class MkRepoTest method fetchStars.
/**
* Repo can return Stars API.
* @throws IOException if some problem inside
*/
@Test
public void fetchStars() throws IOException {
final String user = "testuser2";
final Repo repo = new MkRepo(new MkStorage.InFile(), user, new Coordinates.Simple(user, "testrepo2"));
MatcherAssert.assertThat(repo.stars(), Matchers.notNullValue());
}
use of com.jcabi.github.Repo 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