use of com.jcabi.github.References in project jcabi-github by jcabi.
the class MkReferencesTest method iteratesReferencesInSubNamespace.
/**
* MkReferences can iterate over references in sub-namespace.
* @throws Exception - If something goes wrong.
*/
@Test
public void iteratesReferencesInSubNamespace() throws Exception {
final Repo owner = new MkGithub().randomRepo();
final References refs = owner.git().references();
refs.create("refs/heads/br", "qweqwe");
refs.create("refs/tags/t1", "111t222");
MatcherAssert.assertThat(refs.iterate("heads"), Matchers.<Reference>iterableWithSize(1));
MatcherAssert.assertThat(refs.iterate("tags"), Matchers.<Reference>iterableWithSize(1));
}
use of com.jcabi.github.References in project jcabi-github by jcabi.
the class MkReferencesTest method iteratesHeads.
/**
* MkReferences can iterate over references in Tagsub-namespace.
* @throws Exception - If something goes wrong.
*/
@Test
public void iteratesHeads() throws Exception {
final Repo owner = new MkGithub().randomRepo();
final References refs = owner.git().references();
refs.create("refs/heads/branch2", "blahblah");
MatcherAssert.assertThat(refs.heads(), Matchers.<Reference>iterableWithSize(1));
}
Aggregations