use of org.sonar.scanner.rule.ModuleQProfiles in project sonarqube by SonarSource.
the class QualityProfileProviderTest method testProjectDoesntExist.
@Test
public void testProjectDoesntExist() {
when(projectRepo.exists()).thenReturn(false);
when(loader.loadDefault(anyString())).thenReturn(response);
ModuleQProfiles qps = qualityProfileProvider.provide(key, loader, projectRepo, props);
assertResponse(qps);
verify(loader).loadDefault(anyString());
verifyNoMoreInteractions(loader);
}
use of org.sonar.scanner.rule.ModuleQProfiles in project sonarqube by SonarSource.
the class ActiveRulesProviderTest method mockProfiles.
private static ModuleQProfiles mockProfiles(String... keys) {
List<QualityProfile> profiles = new LinkedList<>();
for (String k : keys) {
QualityProfile p = QualityProfile.newBuilder().setKey(k).setLanguage(k).build();
profiles.add(p);
}
return new ModuleQProfiles(profiles);
}
Aggregations