Package com.jcabi.github

Examples of com.jcabi.github.Repo


     * MkIssues can list issues.
     * @throws Exception If some problem inside
     */
    @Test
    public void iteratesIssues() throws Exception {
        final Repo repo = this.repo();
        repo.issues().create("hey, you", "body of issue");
        repo.issues().create("hey", "body of 2nd issue");
        repo.issues().create("hey again", "body of 3rd issue");
        MatcherAssert.assertThat(
            repo.issues().iterate(new ArrayMap<String, String>()),
            Matchers.<Issue>iterableWithSize(Tv.THREE)
        );
    }
View Full Code Here


     * MkIssues can create a new issue with correct author.
     * @throws Exception If some problem inside
     */
    @Test
    public void createsNewIssueWithCorrectAuthor() throws Exception {
        final Repo repo = this.repo();
        final Issue.Smart issue = new Issue.Smart(
            repo.issues().create("hello", "the body")
        );
        MatcherAssert.assertThat(
            issue.author().login(),
            Matchers.equalTo(repo.github().users().self().login())
        );
    }
View Full Code Here

     * @throws Exception If some problem inside
     */
    @Test
    public void createsMultipleIssues() throws Exception {
        final Github github = new MkGithub("jeff");
        final Repo repo = github.repos().create(
            Json.createObjectBuilder().add("name", "test-3").build()
        );
        for (int idx = 1; idx < Tv.TEN; ++idx) {
            repo.issues().create("title", "body");
        }
    }
View Full Code Here

     * This tests that MkMilestones can return its owner repo.
     * @throws Exception - if something goes wrong.
     */
    @Test
    public void returnsRepo() throws Exception {
        final Repo repo = this.repo();
        final Repo owner = repo.milestones().repo();
        MatcherAssert.assertThat(repo, Matchers.is(owner));
    }
View Full Code Here

     * MkAssignees can check if a collaborator is an assignee for this repo.
     * @throws Exception Exception If some problem inside
     */
    @Test
    public void checkCollaboratorIsAssigneeForRepo() throws Exception {
        final Repo repo = repo();
        repo.collaborators().add("Vladimir");
        MatcherAssert.assertThat(
            repo.assignees().check("Vladimir"),
            Matchers.is(true)
        );
    }
View Full Code Here

TOP

Related Classes of com.jcabi.github.Repo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.