EA-34054 - assert: JUnitUtil.isTestMethodOrConfig

This commit is contained in:
peter
2012-03-02 12:13:18 +04:00
parent a850c64608
commit b61c20a09d
4 changed files with 19 additions and 1 deletions
@@ -195,7 +195,7 @@ public class JUnitUtil {
}
public static boolean isTestMethodOrConfig(@NotNull PsiMethod psiMethod) {
if (getTestMethod(psiMethod, false) != null) {
if (isTestMethod(PsiLocation.fromPsiElement(psiMethod), false)) {
final PsiClass containingClass = psiMethod.getContainingClass();
assert containingClass != null : psiMethod + "; " + psiMethod.getClass() + "; " + psiMethod.getParent();
if (containingClass.hasModifierProperty(PsiModifier.ABSTRACT)) {