Package org.dlese.dpc.junit
Class TestTools
java.lang.Object
org.dlese.dpc.junit.TestTools
This class holds a number of handy static methods to aid in testing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetRandomAlphaString(int length) Generate a random alpha string of the given lengthstatic StringgetRandomCharsString(int length) Generate a random string containing extended chars of the given lengthstatic intgetRandomIntBetween(int low, int high) Generate a random integer >= low and invalid input: '<' highstatic Stringstatic voidstatic voidprintElapsedTime(String msg, Date start, Date end) Print the elapsed time that occured beween two points of time as recorded in java Date objects.
-
Constructor Details
-
TestTools
public TestTools()
-
-
Method Details
-
printElapsedTime
Print the elapsed time that occured beween two points of time as recorded in java Date objects.- Parameters:
msg- A message inserted in front of the elapsed time string.start- The start Date.end- The end Date.
-
getRandomAlphaString
Generate a random alpha string of the given length -
getRandomIntBetween
public static int getRandomIntBetween(int low, int high) Generate a random integer >= low and invalid input: '<' high -
getRandomCharsString
Generate a random string containing extended chars of the given length -
print_char_values
public static void print_char_values() -
getUniqueID
-