|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.testng.internal.Utils
public final class Utils
Helper methods to parse annotations.
Method Summary | |
---|---|
static java.lang.String |
arrayToString(java.lang.String[] strings)
|
static int |
calculateInvokedMethodCount(ITestNGMethod[] methods)
|
static XmlClass[] |
classesToXmlClasses(java.lang.Class<?>[] classes)
|
static java.lang.String[] |
dependentGroupsForThisMethodForConfiguration(java.lang.reflect.Method m,
IAnnotationFinder finder)
|
static java.lang.String[] |
dependentGroupsForThisMethodForTest(java.lang.reflect.Method m,
IAnnotationFinder finder)
|
static java.lang.String |
detailedMethodName(ITestNGMethod method,
boolean fqn)
|
static void |
dumpMap(java.util.Map<?,?> result)
|
static void |
dumpMethods(java.util.List<ITestNGMethod> allMethods)
|
static void |
error(java.lang.String errorMessage)
|
static java.lang.String[] |
groupsForThisMethodForConfiguration(java.lang.reflect.Method m,
IAnnotationFinder finder)
|
static java.lang.String[] |
groupsForThisMethodForTest(java.lang.reflect.Method m,
IAnnotationFinder finder)
|
static void |
initLogger(java.util.logging.Logger logger,
java.lang.String outputLogPath)
|
static boolean |
isStringEmpty(java.lang.String s)
|
static void |
log(java.lang.String msg)
|
static void |
log(java.lang.String cls,
int level,
java.lang.String msg)
Logs the the message to System.out if level is greater than or equal to TestRunner.getVerbose(). |
static void |
logInvocation(java.lang.String reason,
java.lang.reflect.Method thisMethod,
java.lang.Object[] parameters)
|
static java.lang.String[] |
parseMultiLine(java.lang.String line)
|
static java.lang.String[] |
split(java.lang.String string,
java.lang.String sep)
Tokenize the string using the separator. |
static java.lang.String[] |
stackTrace(java.lang.Throwable t,
boolean tohtml)
|
static java.lang.String[] |
stringToArray(java.lang.String s)
Splits the given String s into tokens where the separator is either the space character or the comma character. |
static java.lang.String |
toString(java.lang.Object object,
java.lang.Class<?> objectClass)
|
static void |
writeFile(java.lang.String outputDir,
java.lang.String fileName,
java.lang.String sb)
Writes the content of the sb string to the file named filename in outDir. |
static void |
writeResourceToFile(java.io.File file,
java.lang.String resourceName,
java.lang.Class<?> clasz)
|
static void |
writeUtf8File(java.lang.String outputDir,
java.lang.String fileName,
java.lang.String sb)
Writes the content of the sb string to the file named filename in outDir encoding the output as UTF-8. |
static java.lang.Class<?>[] |
xmlClassesToClasses(java.util.List<XmlClass> classes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String[] stringToArray(java.lang.String s)
s
- the string to split
public static java.lang.Class<?>[] xmlClassesToClasses(java.util.List<XmlClass> classes)
public static XmlClass[] classesToXmlClasses(java.lang.Class<?>[] classes)
public static java.lang.String[] parseMultiLine(java.lang.String line)
public static void writeUtf8File(java.lang.String outputDir, java.lang.String fileName, java.lang.String sb)
outputDir
- the output directory (may not exist). If null then current directory is used.fileName
- the filenamesb
- the file contentpublic static void writeFile(java.lang.String outputDir, java.lang.String fileName, java.lang.String sb)
outputDir
- the output directory (may not exist). If null then current directory is used.fileName
- the filenamesb
- the file contentpublic static void dumpMap(java.util.Map<?,?> result)
result
- public static void dumpMethods(java.util.List<ITestNGMethod> allMethods)
allMethods
- public static java.lang.String[] dependentGroupsForThisMethodForTest(java.lang.reflect.Method m, IAnnotationFinder finder)
public static java.lang.String[] groupsForThisMethodForTest(java.lang.reflect.Method m, IAnnotationFinder finder)
public static java.lang.String[] groupsForThisMethodForConfiguration(java.lang.reflect.Method m, IAnnotationFinder finder)
public static java.lang.String[] dependentGroupsForThisMethodForConfiguration(java.lang.reflect.Method m, IAnnotationFinder finder)
public static void log(java.lang.String msg)
public static void log(java.lang.String cls, int level, java.lang.String msg)
"[cls] msg"
cls
- the class name to prefix the log message.level
- the logging level of the message.msg
- the message to log to System.out.public static void error(java.lang.String errorMessage)
public static int calculateInvokedMethodCount(ITestNGMethod[] methods)
public static java.lang.String[] split(java.lang.String string, java.lang.String sep)
public static void initLogger(java.util.logging.Logger logger, java.lang.String outputLogPath)
public static void logInvocation(java.lang.String reason, java.lang.reflect.Method thisMethod, java.lang.Object[] parameters)
public static void writeResourceToFile(java.io.File file, java.lang.String resourceName, java.lang.Class<?> clasz) throws java.io.IOException
java.io.IOException
public static boolean isStringEmpty(java.lang.String s)
public static java.lang.String[] stackTrace(java.lang.Throwable t, boolean tohtml)
public static java.lang.String toString(java.lang.Object object, java.lang.Class<?> objectClass)
object
-
public static java.lang.String detailedMethodName(ITestNGMethod method, boolean fqn)
method
-
public static java.lang.String arrayToString(java.lang.String[] strings)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |