diff options
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java | 4 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java | 12 |
2 files changed, 0 insertions, 16 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java index 061d93c1b66..fb7d3600758 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java @@ -98,10 +98,6 @@ public class EmailSettings { return server.getPublicRootUrl(); } - public String getInstanceName() { - return config.getBoolean("sonar.sonarcloud.enabled").orElse(false) ? "SonarCloud" : "SonarQube"; - } - private String get(String key, String defaultValue) { return config.get(key).orElse(defaultValue); } diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java index 8de07ea19a0..412e29d5a98 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java @@ -55,18 +55,6 @@ public class EmailSettingsTest { } @Test - public void getInstanceName_returns_sonarqube_when_not_on_SonarCloud() { - assertThat(underTest.getInstanceName()).isEqualTo("SonarQube"); - } - - @Test - public void getInstanceName_returns_sonarcloud_on_SonarCloud() { - settings.setProperty("sonar.sonarcloud.enabled", true); - - assertThat(underTest.getInstanceName()).isEqualTo("SonarCloud"); - } - - @Test public void return_definitions() { assertThat(EmailSettings.definitions()).hasSize(8); } |