use of com.google.gerrit.acceptance.testsuite.change.TestPatchset in project gerrit by GerritCodeReview.
the class PortedCommentsIT method portedReplyStillRefersToParentComment.
@Test
public void portedReplyStillRefersToParentComment() throws Exception {
// Set up change and patchsets.
Change.Id changeId = changeOps.newChange().create();
TestPatchset patchset1 = changeOps.change(changeId).currentPatchset().get();
PatchSet.Id patchset2Id = changeOps.change(changeId).newPatchset().create();
// Add comments.
String rootCommentUuid = newComment(patchset1.patchsetId()).create();
String childCommentUuid = newComment(patchset1.patchsetId()).parentUuid(rootCommentUuid).create();
CommentInfo portedComment = getPortedComment(patchset2Id, childCommentUuid);
assertThat(portedComment).inReplyTo().isEqualTo(rootCommentUuid);
}
use of com.google.gerrit.acceptance.testsuite.change.TestPatchset in project gerrit by GerritCodeReview.
the class PortedCommentsIT method portedCommentHasOriginalTag.
@Test
public void portedCommentHasOriginalTag() throws Exception {
// Set up change and patchsets.
Change.Id changeId = changeOps.newChange().create();
TestPatchset patchset1 = changeOps.change(changeId).currentPatchset().get();
PatchSet.Id patchset2Id = changeOps.change(changeId).newPatchset().create();
// Add comment.
String commentUuid = newComment(patchset1.patchsetId()).tag("My comment tag").create();
CommentInfo portedComment = getPortedComment(patchset2Id, commentUuid);
assertThat(portedComment).tag().isEqualTo("My comment tag");
}
use of com.google.gerrit.acceptance.testsuite.change.TestPatchset in project gerrit by GerritCodeReview.
the class PortedCommentsIT method portedCommentHasOriginalMessage.
@Test
public void portedCommentHasOriginalMessage() throws Exception {
// Set up change and patchsets.
Change.Id changeId = changeOps.newChange().create();
TestPatchset patchset1 = changeOps.change(changeId).currentPatchset().get();
PatchSet.Id patchset2Id = changeOps.change(changeId).newPatchset().create();
// Add comment.
String commentUuid = newComment(patchset1.patchsetId()).message("My comment text").create();
CommentInfo portedComment = getPortedComment(patchset2Id, commentUuid);
assertThat(portedComment).message().isEqualTo("My comment text");
}
use of com.google.gerrit.acceptance.testsuite.change.TestPatchset in project gerrit by GerritCodeReview.
the class PortedCommentsIT method portedCommentHasOriginalPatchsetCommitId.
@Test
public void portedCommentHasOriginalPatchsetCommitId() throws Exception {
// Set up change and patchsets.
Change.Id changeId = changeOps.newChange().create();
TestPatchset patchset1 = changeOps.change(changeId).currentPatchset().get();
PatchSet.Id patchset2Id = changeOps.change(changeId).newPatchset().create();
// Add comment.
String commentUuid = newComment(patchset1.patchsetId()).create();
CommentInfo portedComment = getPortedComment(patchset2Id, commentUuid);
assertThat(portedComment).commitId().isEqualTo(patchset1.commitId().name());
}
Aggregations