public String getGeneratedName(final JavaRunConfigurationModule configurationModule) { if (TEST_PACKAGE.equals(TEST_OBJECT) || TEST_DIRECTORY.equals(TEST_OBJECT)) { final String moduleName = TEST_SEARCH_SCOPE.getScope() == TestSearchScope.WHOLE_PROJECT ? "" : configurationModule.getModuleName(); final String packageName = getPackageName(); if (packageName.length() == 0) { if (moduleName.length() > 0) { return ExecutionBundle.message("default.junit.config.name.all.in.module", moduleName); } return DEFAULT_PACKAGE_NAME; } if (moduleName.length() > 0) { return ExecutionBundle.message( "default.junit.config.name.all.in.package.in.module", packageName, moduleName); } return packageName; } if (TEST_PATTERN.equals(TEST_OBJECT)) { final int size = myPattern.size(); if (size == 0) return "Temp suite"; return StringUtil.getShortName(myPattern.iterator().next()) + (size > 1 ? " and " + (size - 1) + " more" : ""); } final String className = JavaExecutionUtil.getPresentableClassName(getMainClassName(), configurationModule); if (TEST_METHOD.equals(TEST_OBJECT)) { return className + '.' + getMethodName(); } return className; }
public TestSearchScope getScope() { return TEST_SEARCH_SCOPE.getScope(); }