本文整理了Java中org.testng.internal.Utils.split()
方法的一些代码示例,展示了Utils.split()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.split()
方法的具体详情如下:
包路径:org.testng.internal.Utils
类名称:Utils
方法名:split
[英]Tokenize the string using the separator.
[中]使用分隔符标记字符串。
代码示例来源:origin: org.testng/testng
/**
* Define which groups will be included from this run.
*
* @param groups A list of group names separated by a comma.
*/
public void setGroups(String groups) {
m_includedGroups = Utils.split(groups, ",");
}
代码示例来源:origin: org.testng/testng
/**
* Define which groups will be excluded from this run.
*
* @param groups A list of group names separated by a comma.
*/
public void setExcludedGroups(String groups) {
m_excludedGroups = Utils.split(groups, ",");
}
代码示例来源:origin: cbeust/testng
/**
* Define which groups will be included from this run.
*
* @param groups A list of group names separated by a comma.
*/
public void setGroups(String groups) {
m_includedGroups = Utils.split(groups, ",");
}
代码示例来源:origin: cbeust/testng
/**
* Define which groups will be excluded from this run.
*
* @param groups A list of group names separated by a comma.
*/
public void setExcludedGroups(String groups) {
m_excludedGroups = Utils.split(groups, ",");
}
代码示例来源:origin: org.testng/testng
private static String[] getTestClasspath() {
if (null != testClassPaths) {
return testClassPaths;
}
String testClasspath = System.getProperty(TestNG.TEST_CLASSPATH);
if (null == testClasspath) {
return null;
}
String[] classpathFragments= Utils.split(testClasspath, File.pathSeparator);
testClassPaths = new String[classpathFragments.length];
for(int i= 0; i < classpathFragments.length; i++) {
String path;
if(classpathFragments[i].toLowerCase().endsWith(".jar") || classpathFragments[i].toLowerCase().endsWith(".zip")) {
path= classpathFragments[i] + "!/";
}
else {
if(classpathFragments[i].endsWith(File.separator)) {
path= classpathFragments[i];
}
else {
path= classpathFragments[i] + "/";
}
}
testClassPaths[i]= path.replace('\\', '/');
}
return testClassPaths;
}
代码示例来源:origin: cbeust/testng
private static String[] getTestClasspath() {
if (null != testClassPaths) {
return testClassPaths;
}
String testClasspath = RuntimeBehavior.getTestClasspath();
if (null == testClasspath) {
return null;
}
String[] classpathFragments = Utils.split(testClasspath, File.pathSeparator);
testClassPaths = new String[classpathFragments.length];
for (int i = 0; i < classpathFragments.length; i++) {
String path;
if (classpathFragments[i].toLowerCase().endsWith(".jar")
|| classpathFragments[i].toLowerCase().endsWith(".zip")) {
path = classpathFragments[i] + "!/";
} else {
if (classpathFragments[i].endsWith(File.separator)) {
path = classpathFragments[i];
} else {
path = classpathFragments[i] + "/";
}
}
testClassPaths[i] = path.replace('\\', '/');
}
return testClassPaths;
}
代码示例来源:origin: org.testng/testng
sep = ",";
String[] strs = Utils.split(cla.listener, sep);
List<Class<? extends ITestNGListener>> classes = Lists.newArrayList();
String[] strs = Utils.split(cla.methodSelectors, ",");
for (String cls : strs) {
String[] sel = Utils.split(cls, ":");
try {
if (sel.length == 2) {
代码示例来源:origin: cbeust/testng
sep = ",";
String[] strs = Utils.split(cla.listener, sep);
List<Class<? extends ITestNGListener>> classes = Lists.newArrayList();
String[] strs = Utils.split(cla.methodSelectors, ",");
for (String cls : strs) {
String[] sel = Utils.split(cls, ":");
try {
if (sel.length == 2) {
代码示例来源:origin: cbeust/testng-eclipse
public static String[] split(final String string, final String sep) {
return org.testng.internal.Utils.split(string, sep);
}
内容来源于网络,如有侵权,请联系作者删除!