void (PsiClass enumClass, boolean okToLoadTree) { PsiField[] fields = enumClass.getFields(); assertEquals(3, fields.length); checkEnumConstant("A", fields[0]); checkEnumConstant("B", fields[1]); checkEnumConstant("C", fields[2]); if (okToLoadTree) { assertEquals("A", fields[0].getText()); assertEquals("B", fields[1].getText()); assertEquals("C", fields[2].getText()); } }