diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-02-14 13:40:12 +0300 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-02-14 13:40:12 +0300 |
commit | a4667d3565756d3898e0ee277bed1fa575409282 (patch) | |
tree | fd7c031801f49abfa19925dbaa1faa8deeb17b19 /sonar-plugin-api | |
parent | 1fb0a0ebd5f5646e5b7d8ea06656567b49595674 (diff) | |
download | sonarqube-a4667d3565756d3898e0ee277bed1fa575409282.tar.gz sonarqube-a4667d3565756d3898e0ee277bed1fa575409282.zip |
SONAR-2193: Add unit tests
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java index 98396d0e4a5..16ece8c3704 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java @@ -19,13 +19,14 @@ */ package org.sonar.api.utils; -import org.junit.Test; - import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; +import org.junit.Ignore; +import org.junit.Test; + public class WildcardPatternTest { private boolean match(String pattern, String value, String separator) { @@ -102,6 +103,19 @@ public class WildcardPatternTest { assertTrue(match("**", "java/io/Reader")); } + /** + * See http://jira.codehaus.org/browse/SONAR-2193 + */ + @Ignore + @Test + public void issue2193() { + assertTrue(match("**/app/**", "com.app.Utils", ".")); + assertFalse(match("**/app/**", "com.application.MyService", ".")); + + assertTrue(match("**/app/**", "com/app/Utils")); + assertFalse(match("**/app/**", "com/application/MyService")); + } + @Test public void multiplePatterns() { WildcardPattern[] patterns = new WildcardPattern[] { WildcardPattern.create("Foo"), WildcardPattern.create("Bar") }; |