Examples of iterate()


Examples of com.jcabi.github.Collaborators.iterate()

    public void addAndRemove() throws Exception {
        final Collaborators collaborators = this.collaborators();
        final String login = "some_user";
        collaborators.add(login);
        MatcherAssert.assertThat(
            collaborators.iterate(),
            Matchers.<User>iterableWithSize(1)
        );
        MatcherAssert.assertThat(
            collaborators.iterate().iterator().next().login(),
            Matchers.equalTo(login)
View Full Code Here

Examples of com.jcabi.github.Comments.iterate()

    public void iteratesComments() throws Exception {
        final Comments comments = this.comments();
        comments.post("hello, dude!");
        comments.post("hello again");
        MatcherAssert.assertThat(
            comments.iterate(),
            Matchers.<Comment>iterableWithSize(2)
        );
    }

    /**
 
View Full Code Here

Examples of com.jcabi.github.DeployKeys.iterate()

     */
    @Test
    public void canFetchEmptyListOfDeployKeys() throws Exception {
        final DeployKeys deployKeys = MkDeployKeysTest.repo().keys();
        MatcherAssert.assertThat(
            deployKeys.iterate(),
            Matchers.emptyIterable()
        );
    }

    /**
 
View Full Code Here

Examples of com.jcabi.github.Gists.iterate()

        final Gists gists = new MkGithub().gists();
        final Gist gist = gists.create(
            Collections.singletonMap("fileName.txt", "content"), false
        );
        MatcherAssert.assertThat(
            gists.iterate(),
            Matchers.hasItem(gist)
        );
        gists.remove(gist.identifier());
        MatcherAssert.assertThat(
            gists.iterate(),
View Full Code Here

Examples of com.jcabi.github.Gitignores.iterate()

     */
    @Test
    public void canIterateOverTemplates() throws Exception {
        final Gitignores gitignores = new MkGithub().gitignores();
        MatcherAssert.assertThat(
            gitignores.iterate(),
            Matchers.not(Matchers.emptyIterable())
        );
    }
}
View Full Code Here

Examples of com.jcabi.github.Hooks.iterate()

     */
    @Test
    public void canFetchEmptyListOfHooks() throws Exception {
        final Hooks hooks = MkHooksTest.repo().hooks();
        MatcherAssert.assertThat(
            hooks.iterate(),
            Matchers.emptyIterable()
        );
    }

    /**
 
View Full Code Here

Examples of com.jcabi.github.Milestones.iterate()

    @Test
    public void removesMilestone() throws Exception {
        final Milestones milestones = this.repo().milestones();
        final Milestone created = milestones.create("testTitle");
        MatcherAssert.assertThat(
            milestones.iterate(new ArrayMap<String, String>()),
            Matchers.<Milestone>iterableWithSize(1)
        );
        milestones.remove(created.number());
        MatcherAssert.assertThat(
            milestones.iterate(new ArrayMap<String, String>()),
View Full Code Here

Examples of com.jcabi.github.PublicKeys.iterate()

    @Test
    public void retrievesKeys() throws Exception {
        final PublicKeys keys = new MkGithub().users().self().keys();
        final PublicKey key = keys.create("key", "ssh 1AA");
        MatcherAssert.assertThat(
            keys.iterate(),
            Matchers.hasItem(key)
        );
    }

    /**
 
View Full Code Here

Examples of com.jcabi.github.PullComments.iterate()

            .create("new", "", "")
            .comments()
            .post("new pull comment", "new commit", "/p", 1);
        comments.post("test 1", "tesst 1", "/test1", 1);
        MatcherAssert.assertThat(
            comments.iterate(
                comments.pull().number(),
                Collections.<String, String>emptyMap()
            ),
            Matchers.<PullComment>iterableWithSize(1)
        );
View Full Code Here

Examples of com.jcabi.github.References.iterate()

        final Repo owner = this.repo();
        final References refs = owner.git().references();
        refs.create("refs/heads/br", "qweqwe");
        refs.create("refs/tags/t1", "111t222");
        MatcherAssert.assertThat(
            refs.iterate(),
            Matchers.<Reference>iterableWithSize(2)
        );
    }

    /**
 
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.