hudson.plugins.testng.util
Class FormatUtil

java.lang.Object
  extended by hudson.plugins.testng.util.FormatUtil

public class FormatUtil
extends Object

These methods are used to format strings in jelly files

Author:
nullin, farshidce

Constructor Summary
FormatUtil()
           
 
Method Summary
static String escapeString(String str)
          Replaces newline characters in string with <br/> to retain the newlines when the string is displayed in HTML It also replaces < , > , & and " characters with their corresponding html code ref : http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php
static String formatLong(long value)
          Formats a long value and prepends it with a - or + This functions is used for showing the diff values for test runs
static String formatStackTraceForHTML(String stackTrace)
          Formats the stack trace for easier readability
static String formatTimeInMilliSeconds(long duration)
          Formats the time into mill
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatUtil

public FormatUtil()
Method Detail

formatTimeInMilliSeconds

public static String formatTimeInMilliSeconds(long duration)
Formats the time into mill

Parameters:
duration -
Returns:

formatLong

public static String formatLong(long value)
Formats a long value and prepends it with a - or + This functions is used for showing the diff values for test runs

Parameters:
value - - long value
Returns:

escapeString

public static String escapeString(String str)
Replaces newline characters in string with <br/> to retain the newlines when the string is displayed in HTML It also replaces < , > , & and " characters with their corresponding html code ref : http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php

Parameters:
str -
Returns:

formatStackTraceForHTML

public static String formatStackTraceForHTML(String stackTrace)
Formats the stack trace for easier readability

Parameters:
stackTrace -
Returns:


Copyright © 2004-2012. All Rights Reserved.