Class FastUtil


  • public class FastUtil
    extends java.lang.Object
    This class contains various utility methods that are utilized by the FAST Framework
    Since:
    1.0.0
    • Constructor Summary

      Constructors 
      Constructor Description
      FastUtil()  
    • Method Summary

      Modifier and Type Method Description
      static java.lang.String createTestStepDataDirectory​(TestStep tStep)
      Creates a folder to store date for the passed in TestStep
      static java.util.Date getCurrentDateTime()
      Returns the current datetime
      static java.lang.String getCurrentDateTimeAsString()
      Returns the current datetime in yyyy-MM-dd HH:mm:ss format
      static FastElementProperties getProperties​(java.lang.String field)
      Uses the data from the passed in field to create properties
      static java.lang.String getStringDateFromDate​(java.util.Date date, java.lang.String dateFormat)
      Returns a date as a string using the specified dateFormat
      static Status getWorstStatus​(java.util.Set<Status> statuses)
      Returns the worst Status among the status that were passed in
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FastUtil

        public FastUtil()
    • Method Detail

      • getProperties

        public static FastElementProperties getProperties​(java.lang.String field)
        Uses the data from the passed in field to create properties
        Parameters:
        field - A field from a fastStep that contains a UI objects attributes
        Returns:
        FastElementProperties representing a UI objects attributes
        Since:
        1.0.0
      • getCurrentDateTime

        public static java.util.Date getCurrentDateTime()
        Returns the current datetime
        Returns:
        The current datetime
        Since:
        1.0.0
      • getCurrentDateTimeAsString

        public static java.lang.String getCurrentDateTimeAsString()
        Returns the current datetime in yyyy-MM-dd HH:mm:ss format
        Returns:
        The current datetime
        Since:
        1.0.0
      • getStringDateFromDate

        public static java.lang.String getStringDateFromDate​(java.util.Date date,
                                                             java.lang.String dateFormat)
        Returns a date as a string using the specified dateFormat
        Parameters:
        date - A date
        dateFormat - The format the returned string should be in
        Returns:
        A String date
        Since:
        1.0.0
      • getWorstStatus

        public static Status getWorstStatus​(java.util.Set<Status> statuses)
        Returns the worst Status among the status that were passed in
        Parameters:
        statuses - Statuses from which a worst status will be determined
        Returns:
        The worst Status
        Since:
        1.0.0
      • createTestStepDataDirectory

        public static java.lang.String createTestStepDataDirectory​(TestStep tStep)
        Creates a folder to store date for the passed in TestStep
        Parameters:
        tStep - - The TestStep that the TestStepData folder is being created for
        Returns:
        The absolute path the created TestStepData directory
        Since:
        1.0.0