use of org.sonar.api.rule.Severity.BLOCKER in project sonarqube by SonarSource.
the class IssueUpdaterTest method update_issue.
@Test
public void update_issue() {
DefaultIssue issue = db.issues().insertIssue(i -> i.setSeverity(MAJOR)).toDefaultIssue();
UserDto user = db.users().insertUser();
IssueChangeContext context = IssueChangeContext.createUser(new Date(), user.getUuid());
issueFieldsSetter.setSeverity(issue, BLOCKER, context);
underTest.saveIssueAndPreloadSearchResponseData(db.getSession(), issue, context, false);
IssueDto issueReloaded = dbClient.issueDao().selectByKey(db.getSession(), issue.key()).get();
assertThat(issueReloaded.getSeverity()).isEqualTo(BLOCKER);
}
Aggregations