aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorJean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com>2013-07-19 11:07:40 +0200
committerJean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com>2013-07-19 11:07:40 +0200
commit937f6ca6edf15c5bfbaeb63ae26f6e5bdc6867c7 (patch)
tree4088f08f3770fc747a20031f796052f735158b98 /sonar-plugin-api/src
parentdc4e5f4997a7a24c44065537b25eee1a6ef5630f (diff)
downloadsonarqube-937f6ca6edf15c5bfbaeb63ae26f6e5bdc6867c7.tar.gz
sonarqube-937f6ca6edf15c5bfbaeb63ae26f6e5bdc6867c7.zip
Added unit tests to cover additional branches
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/config/internal/CategoryTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/internal/CategoryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/internal/CategoryTest.java
index 7ac22319e63..8b65c47d2c0 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/internal/CategoryTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/internal/CategoryTest.java
@@ -37,4 +37,15 @@ public class CategoryTest {
public void should_preserve_original_key() {
assertThat(new Category("Licenses").originalKey()).isEqualTo("Licenses");
}
+
+ @Test
+ public void should_normalize_key() throws Exception {
+ assertThat(new Category("Licenses").key()).isEqualTo("licenses");
+ }
+
+ @Test
+ public void should_use_original_key() throws Exception {
+ assertThat(new Category("Licenses").toString()).isEqualTo("Licenses");
+ }
+
}