mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
junit method with valid signature: skip utilities
don't warn about non-public methods with parameters even when they start with test
This commit is contained in:
+2
-1
@@ -93,7 +93,8 @@ public class TestUtils {
|
||||
}
|
||||
final String methodName = method.getName();
|
||||
@NonNls final String test = "test";
|
||||
if (!methodName.startsWith(test)) {
|
||||
if (!methodName.startsWith(test) ||
|
||||
!method.hasModifierProperty(PsiModifier.PUBLIC) && method.getParameterList().getParametersCount() > 0) {
|
||||
return false;
|
||||
}
|
||||
final PsiClass containingClass = method.getContainingClass();
|
||||
|
||||
+3
@@ -13,4 +13,7 @@ public class JUnit3TestMethodIsPublicVoidNoArg extends junit.framework.TestCase
|
||||
public void <warning descr="Test method 'testFour()' should probably not have parameters">testFour</warning>(int i) {}
|
||||
|
||||
public void testFive() {}
|
||||
|
||||
//ignore when method doesn't look like test anymore
|
||||
void testSix(int i) {}
|
||||
}
|
||||
Reference in New Issue
Block a user