Class TestTools

java.lang.Object
org.dlese.dpc.junit.TestTools

public class TestTools extends Object
This class holds a number of handy static methods to aid in testing.
  • Constructor Details

    • TestTools

      public TestTools()
  • Method Details

    • 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:
      msg - A message inserted in front of the elapsed time string.
      start - The start Date.
      end - The end Date.
    • 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 invalid input: '<' high
    • getRandomCharsString

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

      public static String getUniqueID()