1 package junitx.util; 2 3 import junit.framework.TestCase; 4 5 9 public class SimpleTestFilterTest extends TestCase { 10 11 public SimpleTestFilterTest(String name) { 12 super(name); 13 } 14 15 public void testGetClassName() { 16 String result = SimpleTestFilter.getClassName("junitx/test/MyClassTest.class"); 17 assertEquals("MyClassTest", result); 18 } 19 20 public void testGetClassNameEmptyPackage() { 21 String result = SimpleTestFilter.getClassName("MyClassTest.class"); 22 assertEquals("MyClassTest", result); 23 } 24 25 public void testGetPackageName() { 26 String result = SimpleTestFilter.getPackageName("junitx/test/MyClassTest.class"); 27 assertEquals("junitx.test", result); 28 } 29 30 public void testGetPackageNameEmptyPackage() { 31 String result = SimpleTestFilter.getPackageName("MyClassTest.class"); 32 assertEquals("", result); 33 } 34 35 } 36 | Popular Tags |