From a4667d3565756d3898e0ee277bed1fa575409282 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Mon, 14 Feb 2011 13:40:12 +0300 Subject: [PATCH] SONAR-2193: Add unit tests --- .../sonar/api/utils/WildcardPatternTest.java | 18 ++++++++++++++++-- 1 file 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") }; -- 2.39.5