void () { PsiClass aClass = getFile("MyEnum").getClasses()[0]; assertTrue(aClass.isEnum()); PsiField[] fields = aClass.getFields(); PsiClassType type = getJavaFacade().getElementFactory().createType(aClass); assertEnumConstant(fields[0], "RED", type); assertEnumConstant(fields[1], "GREEN", type); assertEnumConstant(fields[2], "BLUE", type); }