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("{"));
}
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));
}