1 20 package org.apache.cactus.internal.util; 21 22 import junit.framework.TestCase; 23 24 29 public class TestStringUtil extends TestCase 30 { 31 34 public void testFilterLinePackageTrue() 35 { 36 String [] filterPatterns = new String [] {"my.package" }; 37 assertTrue(StringUtil.filterLine( 38 " at my.package.MyClass.method(MyClass.java:100)", 39 filterPatterns)); 40 } 41 42 45 public void testFilterLinePackageFalse() 46 { 47 String [] filterPatterns = new String [] {"my.package" }; 48 assertTrue(!StringUtil.filterLine( 49 " at other.package.MyClass.method(MyClass.java:100)", 50 filterPatterns)); 51 } 52 53 56 public void testFilterLineClassTrue() 57 { 58 String [] filterPatterns = new String [] {"my.package.MyClass" }; 59 assertTrue(StringUtil.filterLine( 60 " at my.package.MyClass.method(MyClass.java:100)", 61 filterPatterns)); 62 } 63 64 67 public void testFilterLineClassFalse1() 68 { 69 String [] filterPatterns = new String [] {"my.package.MyClass" }; 70 assertTrue(!StringUtil.filterLine( 71 " at my.package.OtherClass.method(MyClass.java:100)", 72 filterPatterns)); 73 } 74 75 78 public void testFilterLineClassFalse2() 79 { 80 String [] filterPatterns = new String [] {"my.package.MyClass" }; 81 assertTrue(!StringUtil.filterLine( 82 " at other.package.MyClass.method(MyClass.java:100)", 83 filterPatterns)); 84 } 85 86 } 87 | Popular Tags |