use of com.jcabi.github.Pull in project jcabi-github by jcabi.
the class MkPullTest method issueIsPull.
@Test
public void issueIsPull() throws Exception {
final Pull pull = MkPullTest.pullRequest();
MatcherAssert.assertThat("Issue is not a pull request", new Issue.Smart(pull.repo().issues().get(pull.number())).isPull(), Matchers.is(true));
}
use of com.jcabi.github.Pull 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