Package com.atlassian.jira.rest.client

Examples of com.atlassian.jira.rest.client.IssueRestClient


    final Comment addedComment = testAddCommentToIssueImpl(issueKey, comment);

    // try to get as anonymous user
    setAnonymousMode();

    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue = issueClient.getIssue(issueKey, pm);

    // test if we can see added comment
    assertFalse(hasComment(issue.getComments(), addedComment.getId()));
  }
View Full Code Here


    final Comment addedComment = testAddCommentToIssueImpl(issueKey, comment);

    // try to get as anonymous user
    setAnonymousMode();

    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue = issueClient.getIssue(issueKey, pm);

    // test if we can see added comment
    assertFalse(hasComment(issue.getComments(), addedComment.getId()));
  }
View Full Code Here

      }
    }).iterator().hasNext();
  }

  private Comment testAddCommentToIssueImpl(String issueKey, Comment comment) {
    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue = issueClient.getIssue(issueKey, pm);
    final List<Comment> initialComments = Lists.newArrayList(issue.getComments());

    issueClient.addComment(pm, issue.getCommentsUri(), comment);

    final Issue issueWithComments = issueClient.getIssue(issueKey, pm);
    final List<Comment> newComments = Lists.newArrayList(issueWithComments.getComments());
    newComments.removeAll(initialComments);
    assertEquals(1, Iterables.size(newComments));
    Comment addedComment = newComments.get(0);
    assertEquals(comment.getBody(), addedComment.getBody());
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.IssueRestClient

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.