DLESE Tools
v1.2

org.dlese.dpc.util
Class TestTools

java.lang.Object
  extended byorg.dlese.dpc.util.TestTools

public class TestTools
extends Object

This class holds a number of handy static methods to aid in testing.


Constructor Summary
TestTools()
           
 
Method Summary
static String getRandomAlphaString(int length)
          Generate a random alpha string of the given length
static String getRandomCharsString(int length)
          Generate a random string containing extended chars of the given length
static int getRandomIntBetween(int low, int high)
          Generate a random integer >= low and < high
static String getUniqueID()
           
static void print_char_values()
           
static void printElapsedTime(String msg, Date start, Date end)
          Print the elapsed time that occured beween two points of time as recorded in java Date objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestTools

public TestTools()
Method Detail

printElapsedTime

public static void printElapsedTime(String msg,
                                    Date start,
                                    Date end)
Print the elapsed time that occured beween two points of time as recorded in java Date objects.

Parameters:
start - The start Date.
end - The end Date.
msg - A message inserted in front of the elapsed time string.

getRandomAlphaString

public static String getRandomAlphaString(int length)
Generate a random alpha string of the given length


getRandomIntBetween

public static int getRandomIntBetween(int low,
                                      int high)
Generate a random integer >= low and < high


getRandomCharsString

public static String getRandomCharsString(int length)
Generate a random string containing extended chars of the given length


print_char_values

public static void print_char_values()

getUniqueID

public static String getUniqueID()

DLESE Tools
v1.2