Search in sources :

Example 1 with AbstractLanguage

use of org.sonar.api.resources.AbstractLanguage in project sonarqube by SonarSource.

the class QualityProfileEventsStepTest method mockLanguageInRepository.

private Language mockLanguageInRepository(String languageKey) {
    Language language = new AbstractLanguage(languageKey, languageKey + "_name") {

        @Override
        public String[] getFileSuffixes() {
            return new String[0];
        }
    };
    when(languageRepository.find(languageKey)).thenReturn(Optional.of(language));
    return language;
}
Also used : AbstractLanguage(org.sonar.api.resources.AbstractLanguage) Language(org.sonar.api.resources.Language) AbstractLanguage(org.sonar.api.resources.AbstractLanguage) Matchers.anyString(org.mockito.Matchers.anyString)

Aggregations

Matchers.anyString (org.mockito.Matchers.anyString)1 AbstractLanguage (org.sonar.api.resources.AbstractLanguage)1 Language (org.sonar.api.resources.Language)1