diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-05-31 12:42:59 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-05-31 12:43:08 +0200 |
commit | 2a37a23b0ff74cd69a3a4c9053f3a2331b234097 (patch) | |
tree | c95368c97f95ac1fc22054c3aa248727df761c4d /sonar-batch | |
parent | 700a38778cbc58108fe100571e2127713c0f3912 (diff) | |
download | sonarqube-2a37a23b0ff74cd69a3a4c9053f3a2331b234097.tar.gz sonarqube-2a37a23b0ff74cd69a3a4c9053f3a2331b234097.zip |
SONAR-3755 fix JSON report when directly analyzing module (like in Eclipse plugin)
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java index b4acfe4cb63..c89471ad889 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/CacheTest.java @@ -53,6 +53,17 @@ public class CacheTest { } @Test + public void test_key_being_prefix_of_another_key() throws Exception { + Cache<String, String> cache = caches.createCache("components"); + + cache.put("struts-el:org.apache.strutsel.taglib.html.ELButtonTag", "the Tag"); + cache.put("struts-el:org.apache.strutsel.taglib.html.ELButtonTagBeanInfo", "the BeanInfo"); + + assertThat(cache.get("struts-el:org.apache.strutsel.taglib.html.ELButtonTag")).isEqualTo("the Tag"); + assertThat(cache.get("struts-el:org.apache.strutsel.taglib.html.ELButtonTagBeanInfo")).isEqualTo("the BeanInfo"); + } + + @Test public void test_put_get_remove_on_groups() throws Exception { Cache<String, Float> cache = caches.createCache("measures"); String group = "org/apache/struts/Action.java"; |