use of com.google.gerrit.entities.LabelType in project gerrit by GerritCodeReview.
the class IgnoreSelfApprovalRuleTest method filtersByLabel.
@Test
public void filtersByLabel() {
LabelType codeReview = makeLabel(LabelId.CODE_REVIEW);
PatchSetApproval approvalVerified = makeApproval(VERIFIED.getLabelId(), USER1, 2);
PatchSetApproval approvalCr = makeApproval(codeReview.getLabelId(), USER1, 2);
Collection<PatchSetApproval> filteredApprovals = IgnoreSelfApprovalRule.filterApprovalsByLabel(ImmutableList.of(approvalVerified, approvalCr), VERIFIED);
assertThat(filteredApprovals).containsExactly(approvalVerified);
}
Aggregations