]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2193: Add unit tests
authorEvgeny Mandrikov <mandrikov@gmail.com>
Mon, 14 Feb 2011 10:40:12 +0000 (13:40 +0300)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Mon, 14 Feb 2011 10:40:12 +0000 (13:40 +0300)
sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java

index 98396d0e4a5f8ea2d2dd0d40816b48e2f732e834..16ece8c3704cc5754dabd9e5752fe2779b67bbc6 100644 (file)
  */
 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") };