use of org.sonar.server.computation.task.projectanalysis.analysis.AnalysisMetadataHolder in project sonarqube by SonarSource.
the class ScmInfoRepositoryImplTest method do_not_query_db_nor_report_if_component_type_is_not_FILE.
@Test
@UseDataProvider("allTypeComponentButFile")
public void do_not_query_db_nor_report_if_component_type_is_not_FILE(Component component) {
BatchReportReader batchReportReader = mock(BatchReportReader.class);
AnalysisMetadataHolder analysisMetadataHolder = mock(AnalysisMetadataHolder.class);
DbClient dbClient = mock(DbClient.class);
SourceHashRepository sourceHashRepository = mock(SourceHashRepository.class);
ScmInfoRepositoryImpl underTest = new ScmInfoRepositoryImpl(batchReportReader, analysisMetadataHolder, dbClient, sourceHashRepository);
assertThat(underTest.getScmInfo(component)).isAbsent();
verifyNoMoreInteractions(batchReportReader, analysisMetadataHolder, dbClient, sourceHashRepository);
}
Aggregations