Search in sources :

Example 1 with Fork

use of com.jcabi.github.Fork in project jcabi-github by jcabi.

the class MkForkTest method fetchAsJson.

/**
 * MkFork can fetch as json object.
 * @throws Exception if any problem inside
 */
@Test
public void fetchAsJson() throws Exception {
    final Fork fork = new MkGithub().randomRepo().forks().create("fork");
    MatcherAssert.assertThat(fork.json().toString(), Matchers.containsString("{"));
}
Also used : Fork(com.jcabi.github.Fork) Test(org.junit.Test)

Example 2 with Fork

use of com.jcabi.github.Fork in project jcabi-github by jcabi.

the class MkForksTest method iteratesForks.

/**
 * MkForks can list forks.
 * @throws Exception If some problem inside
 */
@Test
public void iteratesForks() throws Exception {
    final Repo repo = new MkGithub().randomRepo();
    final Fork fork = repo.forks().create("Organization");
    final Iterable<Fork> iterate = repo.forks().iterate("Order");
    MatcherAssert.assertThat(iterate, Matchers.<Fork>iterableWithSize(1));
    MatcherAssert.assertThat(iterate, Matchers.hasItem(fork));
}
Also used : Fork(com.jcabi.github.Fork) Repo(com.jcabi.github.Repo) Test(org.junit.Test)

Aggregations

Fork (com.jcabi.github.Fork)2 Test (org.junit.Test)2 Repo (com.jcabi.github.Repo)1