use of org.sonar.ce.task.projectanalysis.component.Component.Type in project sonarqube by SonarSource.
the class ScmInfoRepositoryImplTest method allTypeComponentButFile.
@DataProvider
public static Object[][] allTypeComponentButFile() {
Object[][] res = new Object[Component.Type.values().length - 1][1];
int i = 0;
for (Component.Type type : EnumSet.complementOf(EnumSet.of(Component.Type.FILE))) {
if (type.isReportType()) {
res[i][0] = ReportComponent.builder(type, i).build();
} else {
res[i][0] = ViewsComponent.builder(type, i).build();
}
i++;
}
return res;
}
use of org.sonar.ce.task.projectanalysis.component.Component.Type in project sonarqube by SonarSource.
the class CrawlerDepthLimitTest method LEAVES_is_same_as_FILE_and_PROJECT_VIEW.
@Test
public void LEAVES_is_same_as_FILE_and_PROJECT_VIEW() {
assertThat(CrawlerDepthLimit.LEAVES.isSameAs(Type.FILE)).isTrue();
assertThat(CrawlerDepthLimit.LEAVES.isSameAs(Type.PROJECT_VIEW)).isTrue();
for (Type type : from(asList(Type.values())).filter(not(in(ImmutableSet.of(Type.FILE, Type.PROJECT_VIEW))))) {
assertThat(CrawlerDepthLimit.LEAVES.isSameAs(type)).isFalse();
}
}
Aggregations