aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test/java/org/sonar/api/config
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-04-04 16:38:39 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-04-04 16:38:39 +0200
commit6f2f4aa5db7b4cbd9f88e02badf52bf7066b0cbc (patch)
treea1f31d03678eae96701fb65f512f91755c084578 /sonar-plugin-api/src/test/java/org/sonar/api/config
parent0641857555a146b070edac44cc3608f2d1b15c07 (diff)
downloadsonarqube-6f2f4aa5db7b4cbd9f88e02badf52bf7066b0cbc.tar.gz
sonarqube-6f2f4aa5db7b4cbd9f88e02badf52bf7066b0cbc.zip
Use new PropertyDefinition API in CpdPlugin
Diffstat (limited to 'sonar-plugin-api/src/test/java/org/sonar/api/config')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionTest.java8
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java10
2 files changed, 7 insertions, 11 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 b849e2951a5..ea9381e371e 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
@@ -75,8 +75,7 @@ public class PropertyDefinitionTest {
assertThat(def.description()).isEqualTo("desc");
assertThat(def.type()).isEqualTo(PropertyType.FLOAT);
assertThat(def.global()).isFalse();
- assertThat(def.project()).isTrue();
- assertThat(def.module()).isTrue();
+ assertThat(def.qualifiers()).containsOnly(Qualifiers.PROJECT, Qualifiers.MODULE);
assertThat(def.multiValues()).isTrue();
assertThat(def.propertySetKey()).isEqualTo("set");
assertThat(def.fields()).isEmpty();
@@ -97,8 +96,6 @@ public class PropertyDefinitionTest {
assertThat(def.type()).isEqualTo(PropertyType.STRING);
assertThat(def.global()).isTrue();
assertThat(def.qualifiers()).isEmpty();
- assertThat(def.project()).isFalse();
- assertThat(def.module()).isFalse();
assertThat(def.multiValues()).isFalse();
assertThat(def.propertySetKey()).isEmpty();
assertThat(def.fields()).isEmpty();
@@ -119,8 +116,7 @@ public class PropertyDefinitionTest {
assertThat(def.description()).isEmpty();
assertThat(def.type()).isEqualTo(PropertyType.STRING);
assertThat(def.global()).isTrue();
- assertThat(def.project()).isFalse();
- assertThat(def.module()).isFalse();
+ assertThat(def.qualifiers()).isEmpty();
assertThat(def.multiValues()).isFalse();
assertThat(def.propertySetKey()).isEmpty();
assertThat(def.fields()).isEmpty();
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java
index 0837af1bd1a..8b590184818 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java
@@ -93,11 +93,11 @@ public class PropertyDefinitionsTest {
@Test
public void should_group_by_category() {
PropertyDefinitions def = new PropertyDefinitions(
- PropertyDefinition.build("global1").name("Global1").category("catGlobal1").global(true).project(false).module(false).build(),
- PropertyDefinition.build("global2").name("Global2").category("catGlobal1").global(true).project(false).module(false).build(),
- PropertyDefinition.build("global3").name("Global3").category("catGlobal2").global(true).project(false).module(false).build(),
- PropertyDefinition.build("project").name("Project").category("catProject").global(false).project(true).module(false).build(),
- PropertyDefinition.build("module").name("Module").category("catModule").global(false).project(false).module(true).build(),
+ PropertyDefinition.build("global1").name("Global1").category("catGlobal1").global(true).build(),
+ PropertyDefinition.build("global2").name("Global2").category("catGlobal1").global(true).build(),
+ PropertyDefinition.build("global3").name("Global3").category("catGlobal2").global(true).build(),
+ PropertyDefinition.build("project").name("Project").category("catProject").global(false).qualifiers(Qualifiers.PROJECT).build(),
+ PropertyDefinition.build("module").name("Module").category("catModule").global(false).qualifiers(Qualifiers.MODULE).build(),
PropertyDefinition.build("view").name("View").category("catView").global(false).qualifiers(Qualifiers.VIEW).build()
);