mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
junit 5 for inspections: teach junit inspections to work over TestFramework
This commit is contained in:
@@ -120,6 +120,7 @@ public class JUnitUtil {
|
||||
if (psiMethod.getParameterList().getParametersCount() > 0) return false;
|
||||
if (psiMethod.hasModifierProperty(PsiModifier.STATIC) && SUITE_METHOD_NAME.equals(psiMethod.getName())) return false;
|
||||
if (!psiMethod.getName().startsWith("test")) return false;
|
||||
if (psiMethod.hasModifierProperty(PsiModifier.STATIC)) return false;
|
||||
PsiClass testCaseClass = getTestCaseClassOrNull(location);
|
||||
return testCaseClass != null && psiMethod.getContainingClass().isInheritor(testCaseClass, true) && PsiType.VOID.equals(psiMethod.getReturnType());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user