use of org.sonarqube.ws.client.issue.EditCommentRequest in project sonarqube by SonarSource.
the class IssueActionTest method edit_comment.
@Test
public void edit_comment() throws Exception {
Issues.Comment comment = issuesService.addComment(new AddCommentRequest(randomIssue.getKey(), "this is my *comment*")).getIssue().getComments().getComments(0);
Issues.Comment editedComment = issuesService.editComment(new EditCommentRequest(comment.getKey(), "new *comment*")).getIssue().getComments().getComments(0);
assertThat(editedComment.getHtmlText()).isEqualTo("new <strong>comment</strong>");
// reload issue
Issue reloaded = issueRule.getByKey(randomIssue.getKey());
assertThat(reloaded.getComments().getCommentsList()).hasSize(1);
assertThat(reloaded.getComments().getComments(0).getHtmlText()).isEqualTo("new <strong>comment</strong>");
}
Aggregations