mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
junit: support for inheritors of abstract parameterized tests (IDEA-146578)
This commit is contained in:
@@ -108,8 +108,22 @@ public class JUnit4TestRunnerUtil {
|
||||
if (methods.contains(methodName)) {
|
||||
return true;
|
||||
}
|
||||
return name != null && methodName.endsWith(name) &&
|
||||
methods.contains(methodName.substring(0, methodName.length() - name.length()));
|
||||
if (name != null) {
|
||||
return methodName.endsWith(name) &&
|
||||
methods.contains(methodName.substring(0, methodName.length() - name.length()));
|
||||
}
|
||||
|
||||
final Class testClass = description.getTestClass();
|
||||
if (testClass != null) {
|
||||
final RunWith classAnnotation = (RunWith)testClass.getAnnotation(RunWith.class);
|
||||
if (classAnnotation != null && Parameterized.class.isAssignableFrom(classAnnotation.value())) {
|
||||
final int idx = methodName.indexOf("[");
|
||||
if (idx > -1) {
|
||||
return methods.contains(methodName.substring(0, idx));
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user