com.togethersoft.testing.shared.util
Class ConversionUtil


public class ConversionUtil

Utility class, contains static methods for working wirth paths, URLs and stacktraces.

Stereotype tested
testcase test.com.togethersoft.testing.shared.util.TestConversionUtil

Field Summary
 private static CategoryLOG
           

Method Summary
 static URLgetChildUrl(URL parent, String child)
          Returns a child URL for given parent and child name
 static URLgetParentUrl(URL url)
          Returns the parent of given URL
 static StringgetPath(URL url)
          Converts given URL to a path
 static URLpath2url(String path)
          Converts given path to an URL
 static URLstackTrace2URL(String qualifiedClassName, Throwable t)
          file://com.bugworld.ReallyBuggyClass:34
 static URLstackTrace2URL(String qualifiedClassName, String stackTrace)
          Converts a stack trace to URL
 static Stringthrowable2StackTrace(Throwable t)
          Returns the stack trace for throwable object

Field Detail

LOG

private static Category LOG
Method Detail

getChildUrl

public static URL getChildUrl(URL parent, String child)
Returns a child URL for given parent and child name

getParentUrl

public static URL getParentUrl(URL url)
Returns the parent of given URL

getPath

public static String getPath(URL url)
Converts given URL to a path

path2url

public static URL path2url(String path)
Converts given path to an URL

stackTrace2URL

public static URL stackTrace2URL(String qualifiedClassName, Throwable t)
file://com.bugworld.ReallyBuggyClass:34

stackTrace2URL

public static URL stackTrace2URL(String qualifiedClassName, String stackTrace)
Converts a stack trace to URL

throwable2StackTrace

public static String throwable2StackTrace(Throwable t)
Returns the stack trace for throwable object