public void bePatternConfiguration(List<PsiClass> classes, PsiMethod method) { data.TEST_OBJECT = TestType.PATTERN.getType(); final String suffix; if (method != null) { data.METHOD_NAME = method.getName(); suffix = "," + data.METHOD_NAME; } else { suffix = ""; } LinkedHashSet<String> patterns = new LinkedHashSet<String>(); for (PsiClass pattern : classes) { patterns.add(JavaExecutionUtil.getRuntimeQualifiedName(pattern) + suffix); } data.setPatterns(patterns); final Module module = RunConfigurationProducer.getInstance(TestNGPatternConfigurationProducer.class) .findModule(this, getConfigurationModule().getModule(), patterns); if (module == null) { data.setScope(TestSearchScope.WHOLE_PROJECT); setModule(null); } else { setModule(module); } setGeneratedName(); }
public void setPackageConfiguration(Module module, PsiPackage pkg) { data.setPackage(pkg); setModule(module); data.TEST_OBJECT = TestType.PACKAGE.getType(); setGeneratedName(); }
public void setClassConfiguration(PsiClass psiclass) { setModule(data.setMainClass(psiclass)); data.TEST_OBJECT = TestType.CLASS.getType(); setGeneratedName(); }