use of com.google.gerrit.acceptance.rest.util.RestCall in project gerrit by GerritCodeReview.
the class ChangesRestApiBindingsIT method commentEndpoints.
@Test
public void commentEndpoints() throws Exception {
String changeId = createChange().getChangeId();
for (RestCall restCall : COMMENT_ENDPOINTS) {
DraftInput draftInput = new DraftInput();
draftInput.path = Patch.COMMIT_MSG;
draftInput.side = Side.REVISION;
draftInput.line = 1;
draftInput.message = "draft comment";
CommentInfo commentInfo = gApi.changes().id(changeId).current().createDraft(draftInput).get();
ReviewInput reviewInput = new ReviewInput();
reviewInput.drafts = DraftHandling.PUBLISH;
gApi.changes().id(changeId).current().review(reviewInput);
RestApiCallHelper.execute(adminRestSession, restCall, changeId, "current", commentInfo.id);
}
}
use of com.google.gerrit.acceptance.rest.util.RestCall in project gerrit by GerritCodeReview.
the class ChangesRestApiBindingsIT method draftCommentEndpoints.
@Test
public void draftCommentEndpoints() throws Exception {
String changeId = createChange().getChangeId();
for (RestCall restCall : DRAFT_COMMENT_ENDPOINTS) {
DraftInput draftInput = new DraftInput();
draftInput.path = Patch.COMMIT_MSG;
draftInput.side = Side.REVISION;
draftInput.line = 1;
draftInput.message = "draft comment";
CommentInfo draftInfo = gApi.changes().id(changeId).current().createDraft(draftInput).get();
RestApiCallHelper.execute(adminRestSession, restCall, changeId, "current", draftInfo.id);
}
}
Aggregations