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 }