use of org.junit.internal.builders.SuiteMethodBuilder in project intellij-community by JetBrains.
the class JUnit46ClassesRequestBuilder method collectWrappedRunners.
private static List collectWrappedRunners(Class[] classes) throws InitializationError {
final List runners = new ArrayList();
final List nonSuiteClasses = new ArrayList();
final SuiteMethodBuilder suiteMethodBuilder = new SuiteMethodBuilder();
for (int i = 0, length = classes.length; i < length; i++) {
Class aClass = classes[i];
if (suiteMethodBuilder.hasSuiteMethod(aClass)) {
try {
runners.add(new ClassAwareSuiteMethod(aClass));
} catch (Throwable throwable) {
runners.add(new ErrorReportingRunner(aClass, throwable));
}
} else {
nonSuiteClasses.add(aClass);
}
}
runners.addAll(new AllDefaultPossibilitiesBuilder(false).runners(null, (Class[]) nonSuiteClasses.toArray(new Class[nonSuiteClasses.size()])));
return runners;
}
Aggregations