use of com.jcabi.github.Issue 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());
}
use of com.jcabi.github.Issue in project jcabi-github by jcabi.
the class MkPullsTest method canCreateAPull.
/**
* MkPulls can create a pull.
* It should create an issue first, and then pull with the same number
* @throws Exception if some problem inside
*/
@Test
public void canCreateAPull() throws Exception {
final Repo repo = new MkGithub().randomRepo();
final Pull pull = repo.pulls().create("hello", "head-branch", "base-branch");
final Issue.Smart issue = new Issue.Smart(repo.issues().get(pull.number()));
MatcherAssert.assertThat(issue.title(), Matchers.is("hello"));
}
Aggregations