1 package test.net.sourceforge.pmd.ast;
2
3 import junit.framework.TestCase;
4 import net.sourceforge.pmd.ast.ASTImportDeclaration;
5 import net.sourceforge.pmd.ast.ASTName;
6
7 public class ASTImportDeclarationTest extends TestCase {
8
9 public void testBasic() {
10 ASTImportDeclaration i = new ASTImportDeclaration(1);
11 assertTrue(!i.isImportOnDemand());
12 i.setImportOnDemand();
13 assertTrue(i.isImportOnDemand());
14 }
15
16 public void testGetImportedNameNode() {
17 ASTImportDeclaration i = new ASTImportDeclaration(1);
18 ASTName name = new ASTName(2);
19 i.jjtAddChild(name, 0);
20 assertEquals(name, i.getImportedNameNode());
21 }
22 }
This page was automatically generated by Maven