ASTMethodDeclarationTest xref

View Javadoc
1 package net.sourceforge.pmd.ast;
2 
3 import static org.junit.Assert.assertEquals;
4 import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration;
5 import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclarator;
6 
7 import org.junit.Test;
8 
9 public class ASTMethodDeclarationTest {
10 
11 @Test
12 public void testGetVariableName() {
13 int id = 0;
14 
15 ASTMethodDeclaration md = new ASTMethodDeclaration(id++);
16 ASTMethodDeclarator de = new ASTMethodDeclarator(id++);
17 de.setImage("foo");
18 md.jjtAddChild(de, 0);
19 
20 assertEquals("foo", md.getMethodName());
21 }
22 
23 public static junit.framework.Test suite() {
24 return new junit.framework.JUnit4TestAdapter(ASTMethodDeclarationTest.class);
25 }
26 }

AltStyle によって変換されたページ (->オリジナル) /