KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ashkelon > util > TestJDocUtil


1 /*
2  * Created on Aug 2, 2004
3  */

4 package org.ashkelon.util;
5
6 import junit.framework.TestCase;
7
8 /**
9  * @author Eitan Suez
10  */

11 public class TestJDocUtil extends TestCase
12 {
13    public void testUnqualify()
14    {
15       String JavaDoc nestedClassName = "java.applet.Applet.AccessibleApplet";
16       String JavaDoc result = null;
17       
18       result = JDocUtil.unqualify(nestedClassName, true);
19       assertEquals("Unqualify produces wrong result for nested classes",
20             "Applet.AccessibleApplet", result);
21       
22       String JavaDoc className = nestedClassName = "java.applet.Applet";
23       result = JDocUtil.unqualify(className);
24       assertEquals("Unqualify produces wrong result for classes",
25             "Applet", result);
26    }
27 }
28
Popular Tags