Search in sources :

Example 1 with IssueCache

use of org.sonar.server.computation.task.projectanalysis.issue.IssueCache in project sonarqube by SonarSource.

the class PersistIssuesStepTest method setup.

@Before
public void setup() throws Exception {
    issueCache = new IssueCache(temp.newFile(), System2.INSTANCE);
    system2 = mock(System2.class);
    when(system2.now()).thenReturn(NOW);
    reportReader.setMetadata(ScannerReport.Metadata.getDefaultInstance());
    step = new PersistIssuesStep(dbClient, system2, new UpdateConflictResolver(), new RuleRepositoryImpl(dbClient), issueCache);
}
Also used : UpdateConflictResolver(org.sonar.server.computation.task.projectanalysis.issue.UpdateConflictResolver) RuleRepositoryImpl(org.sonar.server.computation.task.projectanalysis.issue.RuleRepositoryImpl) System2(org.sonar.api.utils.System2) IssueCache(org.sonar.server.computation.task.projectanalysis.issue.IssueCache) Before(org.junit.Before)

Example 2 with IssueCache

use of org.sonar.server.computation.task.projectanalysis.issue.IssueCache in project sonarqube by SonarSource.

the class SendIssueNotificationsStepTest method setUp.

@Before
public void setUp() throws Exception {
    issueCache = new IssueCache(temp.newFile(), System2.INSTANCE);
    underTest = new SendIssueNotificationsStep(issueCache, mock(RuleRepository.class), treeRootHolder, notificationService, analysisMetadataHolder, newIssuesNotificationFactory);
    when(newIssuesNotificationFactory.newNewIssuesNotication()).thenReturn(newIssuesNotificationMock);
    when(newIssuesNotificationFactory.newMyNewIssuesNotification()).thenReturn(myNewIssuesNotificationMock);
}
Also used : IssueCache(org.sonar.server.computation.task.projectanalysis.issue.IssueCache) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)2 IssueCache (org.sonar.server.computation.task.projectanalysis.issue.IssueCache)2 System2 (org.sonar.api.utils.System2)1 RuleRepositoryImpl (org.sonar.server.computation.task.projectanalysis.issue.RuleRepositoryImpl)1 UpdateConflictResolver (org.sonar.server.computation.task.projectanalysis.issue.UpdateConflictResolver)1