use of com.jcabi.github.Repo in project jcabi-github by jcabi.
the class MkRepoTest method exposesAttributes.
/**
* Repo can exponse attributes.
* @throws Exception If some problem inside
*/
@Test
public void exposesAttributes() throws Exception {
final Repo repo = new MkGithub().randomRepo();
MatcherAssert.assertThat(new Repo.Smart(repo).description(), Matchers.notNullValue());
MatcherAssert.assertThat(new Repo.Smart(repo).isPrivate(), Matchers.is(false));
}
use of com.jcabi.github.Repo in project jcabi-github by jcabi.
the class MkRepoTest method returnsMkMilestones.
/**
* This tests that the milestones() method in MkRepo is working fine.
* @throws Exception - if anything goes wrong.
*/
@Test
public void returnsMkMilestones() throws Exception {
final Repos repos = new MkRepos(new MkStorage.InFile(), "jeff");
final Repo repo = repos.create(new Repos.RepoCreate("test1", false));
final Milestones milestones = repo.milestones();
MatcherAssert.assertThat(milestones, Matchers.notNullValue());
}
use of com.jcabi.github.Repo in project jcabi-github by jcabi.
the class MkGitTest method canFetchOwnRepo.
/**
* MkGit can fetch its own repo.
*
* @throws Exception if something goes wrong.
*/
@Test
public void canFetchOwnRepo() throws Exception {
final Repo repo = new MkGithub().randomRepo();
MatcherAssert.assertThat(repo.git().repo(), Matchers.equalTo(repo));
}
use of com.jcabi.github.Repo in project jcabi-github by jcabi.
the class MkLabelsTest method setsLabelColor.
/**
* MkLabels can set label color.
* @throws Exception If some problem inside
*/
@Test
public void setsLabelColor() throws Exception {
final Repo repo = new MkGithub().randomRepo();
final String color = "f0f0f0";
final String name = "task";
repo.labels().create(name, color);
MatcherAssert.assertThat(new Label.Smart(repo.labels().get(name)).color(), Matchers.equalTo(color));
}
use of com.jcabi.github.Repo in project jcabi-github by jcabi.
the class MkLabelsTest method deletesLabels.
/**
* MkLabels can delete labels.
* @throws Exception If some problem inside
*/
@Test
public void deletesLabels() throws Exception {
final Repo repo = new MkGithub().randomRepo();
final Labels labels = repo.labels();
final String name = "label-0";
labels.create(name, "e1e1e1");
final Issue issue = repo.issues().create("hey, you!", "");
issue.labels().add(Collections.singletonList(name));
labels.delete(name);
MatcherAssert.assertThat(repo.labels().iterate(), Matchers.emptyIterable());
MatcherAssert.assertThat(issue.labels().iterate(), Matchers.emptyIterable());
}
Aggregations