1 /*** 2 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html 3 */ 4 package test.net.sourceforge.pmd.ast; 5 6 import junit.framework.TestCase; 7 import net.sourceforge.pmd.ast.ASTImportDeclaration; 8 import net.sourceforge.pmd.ast.ASTName; 9 10 public class ASTImportDeclarationTest extends TestCase { 11 12 public void testBasic() { 13 ASTImportDeclaration i = new ASTImportDeclaration(1); 14 assertTrue(!i.isImportOnDemand()); 15 i.setImportOnDemand(); 16 assertTrue(i.isImportOnDemand()); 17 } 18 19 public void testGetImportedNameNode() { 20 ASTImportDeclaration i = new ASTImportDeclaration(1); 21 ASTName name = new ASTName(2); 22 i.jjtAddChild(name, 0); 23 assertEquals(name, i.getImportedNameNode()); 24 } 25 }