use of org.sonar.server.issue.notification.NewIssuesNotification in project sonarqube by SonarSource.
the class SendIssueNotificationsStep method sendNewIssuesNotification.
private void sendNewIssuesNotification(NewIssuesStatistics statistics, Component project, long analysisDate) {
NewIssuesStatistics.Stats globalStatistics = statistics.globalStatistics();
NewIssuesNotification notification = newIssuesNotificationFactory.newNewIssuesNotication().setProject(project.getKey(), project.getUuid(), project.getName()).setAnalysisDate(new Date(analysisDate)).setStatistics(project.getName(), globalStatistics).setDebt(globalStatistics.debt());
service.deliver(notification);
}
use of org.sonar.server.issue.notification.NewIssuesNotification in project sonarqube by SonarSource.
the class SendIssueNotificationsStepTest method createNewIssuesNotificationMock.
private NewIssuesNotification createNewIssuesNotificationMock() {
NewIssuesNotification notification = mock(NewIssuesNotification.class);
when(notification.setProject(anyString(), anyString(), anyString())).thenReturn(notification);
when(notification.setAnalysisDate(any(Date.class))).thenReturn(notification);
when(notification.setStatistics(anyString(), any(NewIssuesStatistics.Stats.class))).thenReturn(notification);
when(notification.setDebt(any(Duration.class))).thenReturn(notification);
return notification;
}
Aggregations