Class TestNameAndDate

  • All Implemented Interfaces:
    java.io.Serializable

    public class TestNameAndDate
    extends java.lang.Object
    implements java.io.Serializable
    Elaborated implementation for test ids, holding its instantiation date. Useful to propagate the test initialization date, when NTP (or the like) global time is used.
    Author:
    Bruno Dillenseger
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      TestNameAndDate​(java.lang.String testName)
      Creates a new test identifier with the provided name, and remembers current time.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getDate()  
      java.lang.String getName()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • TestNameAndDate

        public TestNameAndDate​(java.lang.String testName)
        Creates a new test identifier with the provided name, and remembers current time.
        Parameters:
        testName - the test run name
    • Method Detail

      • getName

        public java.lang.String getName()
      • getDate

        public long getDate()
        Returns:
        this object creation date in ms, which is supposed to be interpreted as the test initialization date.
        See Also:
        System.currentTimeMillis()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string starting by the test run id, followed by a readable and easily sortable representation of its initialization date. Example: run1_2010-03-18_18h20m55