diff options
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java | 8 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java | 7 |
2 files changed, 15 insertions, 0 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 6bc7754873f..3452a4e213b 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 @@ -113,6 +113,7 @@ public class EmailSettings { .defaultValue(SMTP_HOST_DEFAULT) .category(CATEGORY_GENERAL) .subCategory(SUBCATEGORY_EMAIL) + .index(0) .build(), PropertyDefinition.builder(SMTP_PORT) .name("SMTP port") @@ -121,6 +122,7 @@ public class EmailSettings { .category(CATEGORY_GENERAL) .subCategory(SUBCATEGORY_EMAIL) .type(INTEGER) + .index(1) .build(), PropertyDefinition.builder(SMTP_SECURE_CONNECTION) .name("Secure connection") @@ -130,6 +132,7 @@ public class EmailSettings { .subCategory(SUBCATEGORY_EMAIL) .type(SINGLE_SELECT_LIST) .options("ssl", "starttls") + .index(2) .build(), PropertyDefinition.builder(SMTP_USERNAME) .name("SMTP username") @@ -137,6 +140,7 @@ public class EmailSettings { .defaultValue(SMTP_USERNAME_DEFAULT) .category(CATEGORY_GENERAL) .subCategory(SUBCATEGORY_EMAIL) + .index(3) .build(), PropertyDefinition.builder(SMTP_PASSWORD) .name("SMTP password") @@ -145,6 +149,7 @@ public class EmailSettings { .type(PropertyType.PASSWORD) .category(CATEGORY_GENERAL) .subCategory(SUBCATEGORY_EMAIL) + .index(4) .build(), PropertyDefinition.builder(FROM) .name("From address") @@ -152,6 +157,7 @@ public class EmailSettings { .defaultValue(FROM_DEFAULT) .category(CATEGORY_GENERAL) .subCategory(SUBCATEGORY_EMAIL) + .index(5) .build(), PropertyDefinition.builder(FROM_NAME) .name("From name") @@ -159,6 +165,7 @@ public class EmailSettings { .defaultValue(FROM_NAME_DEFAULT) .category(CATEGORY_GENERAL) .subCategory(SUBCATEGORY_EMAIL) + .index(6) .build(), PropertyDefinition.builder(PREFIX) .name("Email prefix") @@ -166,6 +173,7 @@ public class EmailSettings { .defaultValue(PREFIX_DEFAULT) .category(CATEGORY_GENERAL) .subCategory(SUBCATEGORY_EMAIL) + .index(7) .build()); } } 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 6b49486e1f6..5aed83ef381 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 @@ -58,4 +58,11 @@ public class EmailSettingsTest { public void return_definitions() { assertThat(EmailSettings.definitions()).hasSize(8); } + + @Test + public void definitions_should_have_index() { + assertThat(EmailSettings.definitions()) + .extracting(PropertyDefinition::index) + .isNotEqualTo(999); + } } |