use of com.google.gerrit.extensions.common.AttentionSetInfo in project gerrit by GerritCodeReview.
the class AttentionSetIT method reviewWithManuallyAddedUserAndTemplateReason.
@Test
public void reviewWithManuallyAddedUserAndTemplateReason() throws Exception {
PushOneCommit.Result r = createChange();
requestScopeOperations.setApiUser(user.id());
String manualReason = "Review by " + AccountTemplateUtil.getAccountTemplate(user.id());
ReviewInput reviewInput = ReviewInput.create().addUserToAttentionSet(user.email(), manualReason);
change(r).current().review(reviewInput);
AttentionSetInfo attentionSetInfo = change(r).get().attentionSet.get(user.id().get());
assertThat(attentionSetInfo.reason).isEqualTo(manualReason);
assertThat(attentionSetInfo.reasonAccount).isEqualTo(getAccountInfo(user.id()));
assertThat(attentionSetInfo.account).isEqualTo(getAccountInfo(user.id()));
}
Aggregations