use of com.theoryinpractice.testng.model.TestClassFilter in project intellij-community by JetBrains.
the class GroupBrowser method showDialog.
@Nullable
@Override
protected String showDialog() {
TestClassFilter filter;
Module module = editor.getModuleSelector().getModule();
if (module == null) {
filter = new TestClassFilter(GlobalSearchScope.projectScope(getProject()), getProject(), false);
} else {
filter = new TestClassFilter(GlobalSearchScope.moduleScope(module), getProject(), false);
}
PsiClass[] classes = TestNGUtil.getAllTestClasses(filter, true);
if (classes == null || classes.length == 0) {
Messages.showMessageDialog(getField(), "No tests found in project", "Cannot Browse Groups", Messages.getInformationIcon());
return null;
} else {
return GroupList.showDialog(classes, getField());
}
}
use of com.theoryinpractice.testng.model.TestClassFilter in project intellij-community by JetBrains.
the class TestClassBrowser method getFilter.
public ClassFilter.ClassFilterWithScope getFilter() throws MessageInfoException {
TestNGConfiguration config = new TestNGConfiguration("<no-name>", getProject(), TestNGConfigurationType.getInstance().getConfigurationFactories()[0]);
editor.applyEditorTo(config);
GlobalSearchScope scope = getSearchScope(config.getModules());
if (scope == null) {
scope = GlobalSearchScope.allScope(getProject());
}
return new TestClassFilter(scope, getProject(), false);
}
Aggregations