use of com.intellij.execution.testframework.sm.runner.SMTestProxy in project intellij by bazelbuild.
the class SmRunnerUtils method getSelectedSmRunnerTreeElements.
public static List<Location<?>> getSelectedSmRunnerTreeElements(ConfigurationContext context) {
Project project = context.getProject();
List<SMTestProxy> tests = getSelectedTestProxies(context);
return tests.stream().map(test -> (Location<?>) test.getLocation(project, GlobalSearchScope.allScope(project))).filter(Objects::nonNull).collect(Collectors.toList());
}
use of com.intellij.execution.testframework.sm.runner.SMTestProxy in project intellij by bazelbuild.
the class SmRunnerUtils method countSelectedTestCases.
/**
* Counts all selected test cases, and their children, recursively
*/
public static int countSelectedTestCases(ConfigurationContext context) {
List<SMTestProxy> tests = getSelectedTestProxies(context);
Set<SMTestProxy> allTests = new HashSet<>(tests);
for (SMTestProxy test : tests) {
allTests.addAll(test.collectChildren());
}
return allTests.size();
}
Aggregations