use of org.sonar.ce.task.projectanalysis.measure.MeasureRepository in project sonarqube by SonarSource.
the class QualityGateEventsStepTest method no_alert_on_pull_request_branches.
@Test
public void no_alert_on_pull_request_branches() {
Branch pr = mock(Branch.class);
when(pr.getType()).thenReturn(BranchType.PULL_REQUEST);
analysisMetadataHolder.setBranch(pr);
TreeRootHolder treeRootHolder = mock(TreeRootHolder.class);
MetricRepository metricRepository = mock(MetricRepository.class);
MeasureRepository measureRepository = mock(MeasureRepository.class);
EventRepository eventRepository = mock(EventRepository.class);
NotificationService notificationService = mock(NotificationService.class);
QualityGateEventsStep underTest = new QualityGateEventsStep(treeRootHolder, metricRepository, measureRepository, eventRepository, notificationService, analysisMetadataHolder);
underTest.execute(new TestComputationStepContext());
verifyZeroInteractions(treeRootHolder, metricRepository, measureRepository, eventRepository, notificationService);
}
Aggregations