use of com.cloudogu.scm.review.pullrequest.service.PullRequest in project scm-review-plugin by scm-manager.
the class AllReviewerApprovedRuleTest method shouldReturnFailedIfSingleReviewerHasNotApproved.
@Test
void shouldReturnFailedIfSingleReviewerHasNotApproved() {
PullRequest pullRequest = TestData.createPullRequest();
pullRequest.addApprover("trillian");
pullRequest.addReviewer("dent");
Context context = new Context(REPOSITORY, pullRequest);
Result result = rule.validate(context);
assertThat(result.isFailed()).isTrue();
}
use of com.cloudogu.scm.review.pullrequest.service.PullRequest in project scm-review-plugin by scm-manager.
the class AllReviewerApprovedRuleTest method shouldReturnSuccessWithoutReviewers.
@Test
void shouldReturnSuccessWithoutReviewers() {
PullRequest pullRequest = TestData.createPullRequest();
Context context = new Context(REPOSITORY, pullRequest);
Result result = rule.validate(context);
assertThat(result.isSuccess()).isTrue();
}
Aggregations