Search in sources :

Example 41 with Repo

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);
}
Also used : Repo(com.jcabi.github.Repo)

Example 42 with Repo

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());
}
Also used : Repo(com.jcabi.github.Repo) Coordinates(com.jcabi.github.Coordinates) Test(org.junit.Test)

Example 43 with Repo

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());
}
Also used : Repo(com.jcabi.github.Repo) Coordinates(com.jcabi.github.Coordinates) Test(org.junit.Test)

Example 44 with Repo

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());
}
Also used : Repo(com.jcabi.github.Repo) Coordinates(com.jcabi.github.Coordinates) Test(org.junit.Test)

Example 45 with Repo

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));
}
Also used : Repo(com.jcabi.github.Repo) Language(com.jcabi.github.Language) Coordinates(com.jcabi.github.Coordinates) Test(org.junit.Test)

Aggregations

Repo (com.jcabi.github.Repo)57 Test (org.junit.Test)55 Coordinates (com.jcabi.github.Coordinates)11 Issue (com.jcabi.github.Issue)10 Repos (com.jcabi.github.Repos)10 References (com.jcabi.github.References)5 Github (com.jcabi.github.Github)3 JsonObject (javax.json.JsonObject)3 Comment (com.jcabi.github.Comment)2 Content (com.jcabi.github.Content)2 Event (com.jcabi.github.Event)2 RepoCommit (com.jcabi.github.RepoCommit)2 ArrayMap (com.jcabi.immutable.ArrayMap)2 Branch (com.jcabi.github.Branch)1 Contents (com.jcabi.github.Contents)1 Fork (com.jcabi.github.Fork)1 IssueLabels (com.jcabi.github.IssueLabels)1 Label (com.jcabi.github.Label)1 Labels (com.jcabi.github.Labels)1 Language (com.jcabi.github.Language)1