KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > junitx > util > SimpleTestFilterTest


1 package junitx.util;
2
3 import junit.framework.TestCase;
4
5 /**
6  * @version $Revision: 1.1 $, $Date: 2003/04/02 04:50:43 $
7  * @author <a HREF="mailto:vbossica@users.sourceforge.net">Vladimir R. Bossicard</a>
8  */

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