Search in sources :

Example 1 with EnumTest

use of net.sourceforge.pmd.lang.java.symboltable.testdata.InnerClass.TheInnerClass.EnumTest in project pmd by pmd.

the class ClassScopeTest method testImportNestedClassesResolution.

@Test
public void testImportNestedClassesResolution() {
    parseCode(IMPORT_NESTED_CLASSES);
    final ASTClassOrInterfaceDeclaration n = acu.findDescendantsOfType(ASTClassOrInterfaceDeclaration.class).get(0);
    final ClassScope c = (ClassScope) n.getScope();
    assertEquals(EnumTest.class, c.resolveType("EnumTest"));
}
Also used : ASTClassOrInterfaceDeclaration(net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration) Test(org.junit.Test) EnumTest(net.sourceforge.pmd.lang.java.symboltable.testdata.InnerClass.TheInnerClass.EnumTest)

Aggregations

ASTClassOrInterfaceDeclaration (net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration)1 EnumTest (net.sourceforge.pmd.lang.java.symboltable.testdata.InnerClass.TheInnerClass.EnumTest)1 Test (org.junit.Test)1