import org.sonar.batch.rule.ModuleQProfiles;
import org.sonar.batch.rule.ModuleQProfiles.QProfile;
+import java.util.Collections;
import java.util.List;
import static org.mockito.Mockito.mock;
}
+ @Test
+ public void should_not_fail_if_no_language_on_project() {
+ settings.setProperty("sonar.profile", "Unknow");
+ when(languages.languages()).thenReturn(Collections.<Language>emptyList());
+
+ ProfileLogger profileLogger = new ProfileLogger(settings, languages, profiles);
+
+ profileLogger.execute();
+
+ }
+
@Test
public void should_not_fail_if_default_profile_used_at_least_once() {
settings.setProperty("sonar.profile", "My Java profile");