]> source.dussan.org Git - sonarqube.git/commitdiff
Added unit tests to cover additional branches
authorJean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com>
Fri, 19 Jul 2013 09:07:40 +0000 (11:07 +0200)
committerJean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com>
Fri, 19 Jul 2013 09:07:40 +0000 (11:07 +0200)
sonar-plugin-api/src/test/java/org/sonar/api/config/internal/CategoryTest.java

index 7ac22319e634483193cf48b31fb45625a0c5e91b..8b65c47d2c0bd662e21b426b286a025ea936877d 100644 (file)
@@ -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");
+  }
+
 }