mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
extend test framework: isTestMethodOrConfig
This commit is contained in:
@@ -27,4 +27,6 @@ import com.intellij.util.IncorrectOperationException;
|
||||
public interface TestFramework {
|
||||
boolean isTestKlass(PsiClass psiClass);
|
||||
PsiMethod findSetUpMethod(PsiClass psiClass) throws IncorrectOperationException;
|
||||
|
||||
boolean isTestMethodOrConfig(PsiMethod psiMethod);
|
||||
}
|
||||
@@ -66,4 +66,8 @@ public class JUnitTestFramework implements TestFramework {
|
||||
}
|
||||
return inClass;
|
||||
}
|
||||
|
||||
public boolean isTestMethodOrConfig(PsiMethod psiMethod) {
|
||||
return JUnitUtil.isTestMethodOrConfig(psiMethod);
|
||||
}
|
||||
}
|
||||
@@ -477,6 +477,10 @@ public class TestNGUtil implements TestFramework
|
||||
return inClass;
|
||||
}
|
||||
|
||||
public boolean isTestMethodOrConfig(PsiMethod psiMethod) {
|
||||
return hasTest(psiMethod) || hasConfig(psiMethod);
|
||||
}
|
||||
|
||||
public static boolean checkTestNGInClasspath(PsiElement psiElement) {
|
||||
final Project project = psiElement.getProject();
|
||||
final PsiManager manager = PsiManager.getInstance(project);
|
||||
|
||||
Reference in New Issue
Block a user