aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2017-07-19 17:39:58 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2017-07-31 11:27:51 +0200
commitefa642539ddb1475ec2d1150af5ff3e0c8cb1167 (patch)
tree1dcf35275bf82cf321d797787913755a9f45e9ce /sonar-plugin-api
parent3f31a1c20bc8dcf8bfdb986f225e5921b19fd64d (diff)
downloadsonarqube-efa642539ddb1475ec2d1150af5ff3e0c8cb1167.tar.gz
sonarqube-efa642539ddb1475ec2d1150af5ff3e0c8cb1167.zip
SONAR-9551 Page API supports APP qualifier
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/web/page/Page.java1
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/web/page/PageTest.java4
2 files changed, 4 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/page/Page.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/page/Page.java
index 785f7c29b5d..a1668b2aa25 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/web/page/Page.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/page/Page.java
@@ -81,6 +81,7 @@ public final class Page {
public enum Qualifier {
PROJECT(org.sonar.api.resources.Qualifiers.PROJECT),
MODULE(org.sonar.api.resources.Qualifiers.MODULE),
+ APP(org.sonar.api.resources.Qualifiers.APP),
VIEW(org.sonar.api.resources.Qualifiers.VIEW),
SUB_VIEW(org.sonar.api.resources.Qualifiers.SUBVIEW);
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/web/page/PageTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/web/page/PageTest.java
index ed82b7a5ee2..6e6430ea84c 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/web/page/PageTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/web/page/PageTest.java
@@ -26,6 +26,7 @@ import org.sonar.api.resources.Qualifiers;
import org.sonar.api.web.page.Page.Qualifier;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.sonar.api.web.page.Page.Qualifier.APP;
import static org.sonar.api.web.page.Page.Qualifier.MODULE;
import static org.sonar.api.web.page.Page.Qualifier.PROJECT;
import static org.sonar.api.web.page.Page.Qualifier.SUB_VIEW;
@@ -59,6 +60,7 @@ public class PageTest {
assertThat(Qualifier.PROJECT.getKey()).isEqualTo(org.sonar.api.resources.Qualifiers.PROJECT);
assertThat(Qualifier.MODULE.getKey()).isEqualTo(org.sonar.api.resources.Qualifiers.MODULE);
assertThat(Qualifier.VIEW.getKey()).isEqualTo(org.sonar.api.resources.Qualifiers.VIEW);
+ assertThat(Qualifier.APP.getKey()).isEqualTo(org.sonar.api.resources.Qualifiers.APP);
assertThat(Qualifier.SUB_VIEW.getKey()).isEqualTo(org.sonar.api.resources.Qualifiers.SUBVIEW);
}
@@ -66,7 +68,7 @@ public class PageTest {
public void authorized_qualifiers() {
Qualifier[] qualifiers = Qualifier.values();
- assertThat(qualifiers).hasSize(4).containsOnly(PROJECT, MODULE, VIEW, SUB_VIEW);
+ assertThat(qualifiers).containsExactlyInAnyOrder(PROJECT, MODULE, VIEW, SUB_VIEW, APP);
}
@Test