Package com.jcabi.github

Examples of com.jcabi.github.Collaborators


     * MkCollaborators can add, remove and iterate collaborators.
     * @throws Exception If some problem inside
     */
    @Test
    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)
        );
        collaborators.remove(login);
        MatcherAssert.assertThat(
            collaborators.iterate(),
            Matchers.<User>iterableWithSize(0)
        );
    }
View Full Code Here


     * MkCollaborators can check whether  user is collaborator or not.
     * @throws Exception If some problem inside
     */
    @Test
    public void isCollaborator() throws Exception {
        final Collaborators collaborators = this.collaborators();
        final String collaborator = "collaborator";
        final String stranger = "stranger";
        collaborators.add(collaborator);
        MatcherAssert.assertThat(
            collaborators.isCollaborator(collaborator),
            Matchers.equalTo(true)
        );
        MatcherAssert.assertThat(
            collaborators.isCollaborator(stranger),
            Matchers.equalTo(false)
        );
    }
View Full Code Here

TOP

Related Classes of com.jcabi.github.Collaborators

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.