mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-123818 Inspection "JUnit TestCase with non-trivial constructors" should not report error when used in a Parameterized test
This commit is contained in:
+2
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.siyeh.ig.junit;
|
||||
|
||||
import com.intellij.codeInsight.AnnotationUtil;
|
||||
import com.intellij.psi.*;
|
||||
import com.siyeh.InspectionGadgetsBundle;
|
||||
import com.siyeh.ig.BaseInspection;
|
||||
@@ -65,7 +66,7 @@ public class TestCaseWithConstructorInspection extends BaseInspection {
|
||||
return;
|
||||
}
|
||||
final PsiClass aClass = method.getContainingClass();
|
||||
if (!TestUtils.isJUnitTestClass(aClass)) {
|
||||
if (aClass == null || !TestUtils.isJUnitTestClass(aClass) || AnnotationUtil.isAnnotated(aClass, "org.junit.runner.RunWith", true)) {
|
||||
return;
|
||||
}
|
||||
final PsiCodeBlock body = method.getBody();
|
||||
|
||||
Reference in New Issue
Block a user