Package com.jcabi.github

Examples of com.jcabi.github.Repo.labels()


     */
    @Test
    public void iteratesIssues() throws Exception {
        final Repo repo = this.repo();
        final String name = "bug";
        repo.labels().create(name, "c0c0c0");
        final Issue issue = repo.issues().create("title", "body");
        issue.labels().add(Collections.singletonList(name));
        MatcherAssert.assertThat(
            issue.labels().iterate(),
            Matchers.<Label>iterableWithSize(1)
View Full Code Here


     * @throws Exception If some problem inside
     */
    @Test
    public void iteratesLabels() throws Exception {
        final Repo repo = this.repo();
        repo.labels().create("bug", "e0e0e0");
        MatcherAssert.assertThat(
            repo.labels().iterate(),
            Matchers.<Label>iterableWithSize(1)
        );
    }
View Full Code Here

    @Test
    public void iteratesLabels() throws Exception {
        final Repo repo = this.repo();
        repo.labels().create("bug", "e0e0e0");
        MatcherAssert.assertThat(
            repo.labels().iterate(),
            Matchers.<Label>iterableWithSize(1)
        );
    }

    /**
 
View Full Code Here

     * @throws Exception If some problem inside
     */
    @Test
    public void deletesLabels() throws Exception {
        final Repo repo = this.repo();
        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);
View Full Code Here

        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()
View Full Code Here

    @Test
    public void setsLabelColor() throws Exception {
        final Repo repo = this.repo();
        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)
        );
    }
View Full Code Here

        final Repo repo = this.repo();
        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)
        );
    }

    /**
 
View Full Code Here

        final Github github = new RtGithub();
        final Repo repo = github.repos().get(
            new Coordinates.Simple("jcabi/jcabi-github")
        );
        MatcherAssert.assertThat(
            repo.labels().iterate().iterator().hasNext(),
            Matchers.equalTo(true)
        );
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.