KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > net > sourceforge > pmd > ast > ASTMethodDeclarationTest


1 package test.net.sourceforge.pmd.ast;
2
3 import junit.framework.TestCase;
4 import net.sourceforge.pmd.ast.ASTMethodDeclaration;
5 import net.sourceforge.pmd.ast.ASTMethodDeclarator;
6
7 public class ASTMethodDeclarationTest extends TestCase {
8
9     public void testGetVariableName() {
10         int id = 0;
11
12         ASTMethodDeclaration md = new ASTMethodDeclaration(id++);
13         ASTMethodDeclarator de = new ASTMethodDeclarator(id++);
14         de.setImage("foo");
15         md.jjtAddChild(de, 0);
16
17         assertEquals("foo", md.getMethodName());
18     }
19 }
20
Popular Tags