aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java
index caea3a388b7..3a4fcbea156 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java
@@ -81,7 +81,7 @@ public class PropertyDefinitionTest {
}
@Properties(@Property(key = "hello", name = "Hello", fields = {
- @PropertyField(key = "first", name = "First"),
+ @PropertyField(key = "first", name = "First", description = "Description", options = {"A", "B"}),
@PropertyField(key = "second", name = "Second", type = PropertyType.INTEGER)}))
static class WithPropertySet {
}
@@ -96,10 +96,13 @@ public class PropertyDefinitionTest {
assertThat(def.getFields()).hasSize(2);
assertThat(def.getFields()[0].getKey()).isEqualTo("first");
assertThat(def.getFields()[0].getName()).isEqualTo("First");
+ assertThat(def.getFields()[0].getDescription()).isEqualTo("Description");
assertThat(def.getFields()[0].getType()).isEqualTo(PropertyType.STRING);
+ assertThat(def.getFields()[0].getOptions()).containsOnly("A", "B");
assertThat(def.getFields()[1].getKey()).isEqualTo("second");
assertThat(def.getFields()[1].getName()).isEqualTo("Second");
assertThat(def.getFields()[1].getType()).isEqualTo(PropertyType.INTEGER);
+ assertThat(def.getFields()[1].getOptions()).isEmpty();
}
@Properties(@Property(key = "hello", name = "Hello"))