Class CDateWait


  • public class CDateWait
    extends CObjectWait
    Date wait class contains all wait method which is related to Date
    • Constructor Summary

      Constructors 
      Constructor Description
      CDateWait()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean waitEquals​(java.util.Date actual, java.util.Date expected, int waitInSeconds, int intervalInMilliSeconds)
      Wait for defined number of seconds till actual and expected have the exact same date value (compare to milliseconds) or they both has null value
      static boolean waitEqualsByFormat​(java.util.Date actual, java.util.Date expected, java.lang.String format, int waitInSeconds, int intervalInMilliSeconds)
      Wait for defined number of seconds till actual and expected have the exact same string value after they converted using the provided date format.
      static boolean waitEqualsDatePortion​(java.util.Date actual, java.util.Date expected, int waitInSeconds, int intervalInMilliSeconds)
      Wait for defined number of seconds till actual and expected have same string value after they converted using "yyyy-MM-dd" for format.
      static boolean waitEqualsTimePortion​(java.util.Date actual, java.util.Date expected, int waitInSeconds, int intervalInMilliSeconds)
      Wait for defined number of seconds till actual and expected have same string value after they converted using "HH:mm:ss" for format.
      static boolean waitNotEquals​(java.util.Date actual, java.util.Date expected, int waitInSeconds, int intervalInMilliSeconds)
      Wait for defined number of seconds till actual and expected does not have the exact same date value (compare to milliseconds) or one of them is null
      static boolean waitNotEqualsByFormat​(java.util.Date actual, java.util.Date expected, java.lang.String format, int waitInSeconds, int intervalInMilliSeconds)
      Wait for defined number of seconds till actual and expected have different string value after they converted using the provided date format.
      static boolean waitNotEqualsDatePortion​(java.util.Date actual, java.util.Date expected, int waitInSeconds, int intervalInMilliSeconds)
      Wait for defined number of seconds till actual and expected have different string value after they converted using "yyyy-MM-dd" for format.
      static boolean waitNotEqualsTimePortion​(java.util.Date actual, java.util.Date expected, int waitInSeconds, int intervalInMilliSeconds)
      Wait for defined number of seconds till actual and expected have different string value after they converted using "HH:mm:ss" for format.
      • Methods inherited from class java.lang.Object

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

      • CDateWait

        public CDateWait()
    • Method Detail

      • waitEquals

        public static boolean waitEquals​(java.util.Date actual,
                                         java.util.Date expected,
                                         int waitInSeconds,
                                         int intervalInMilliSeconds)
        Wait for defined number of seconds till actual and expected have the exact same date value (compare to milliseconds) or they both has null value

        Please note that verification consider as passe if both value is null

        Parameters:
        actual - value to compare
        expected - value to compare
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - interval between retries in milliseconds
        Returns:
        return actual value or null if the timeout reached
      • waitEqualsByFormat

        public static boolean waitEqualsByFormat​(java.util.Date actual,
                                                 java.util.Date expected,
                                                 java.lang.String format,
                                                 int waitInSeconds,
                                                 int intervalInMilliSeconds)
        Wait for defined number of seconds till actual and expected have the exact same string value after they converted using the provided date format. Means that verification of "2019-08-09 12:20" and "2019-08-09 11:20" using "yyyy-MM-dd" passes.

        Please note that verification consider as passe if both value is null

        Parameters:
        actual - value to compare
        expected - value to compare
        format - date format to be use
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - interval between retries in milliseconds
        Returns:
        return actual value or null if the timeout reached
      • waitEqualsDatePortion

        public static boolean waitEqualsDatePortion​(java.util.Date actual,
                                                    java.util.Date expected,
                                                    int waitInSeconds,
                                                    int intervalInMilliSeconds)
        Wait for defined number of seconds till actual and expected have same string value after they converted using "yyyy-MM-dd" for format. Means that verification of "2019-08-09 12:20" and "2019-08-09 11:20" passes

        Please note that verification consider as passe if both value is null

        Parameters:
        actual - value to compare
        expected - value to compare
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - interval between retries in milliseconds
        Returns:
        return actual value or null if the timeout reached
      • waitEqualsTimePortion

        public static boolean waitEqualsTimePortion​(java.util.Date actual,
                                                    java.util.Date expected,
                                                    int waitInSeconds,
                                                    int intervalInMilliSeconds)
        Wait for defined number of seconds till actual and expected have same string value after they converted using "HH:mm:ss" for format. Means that verification of "2019-08-09 12:20" and "2019-08-08 12:20" passes

        Please note that verification consider as passe if both value is null

        Parameters:
        actual - value to compare
        expected - value to compare
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - interval between retries in milliseconds
        Returns:
        return actual value or null if the timeout reached
      • waitNotEquals

        public static boolean waitNotEquals​(java.util.Date actual,
                                            java.util.Date expected,
                                            int waitInSeconds,
                                            int intervalInMilliSeconds)
        Wait for defined number of seconds till actual and expected does not have the exact same date value (compare to milliseconds) or one of them is null

        Please note that verification consider as passe if one of value is null

        Parameters:
        actual - value to compare
        expected - value to compare
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - interval between retries in milliseconds
        Returns:
        return actual value or null if the timeout reached
      • waitNotEqualsByFormat

        public static boolean waitNotEqualsByFormat​(java.util.Date actual,
                                                    java.util.Date expected,
                                                    java.lang.String format,
                                                    int waitInSeconds,
                                                    int intervalInMilliSeconds)
        Wait for defined number of seconds till actual and expected have different string value after they converted using the provided date format. Means that verification of "2019-08-09 12:20" and "2019-08-09 11:20" using "yyyy-MM-dd HH" passes (means values are different)

        Please note that verification consider as passe if one of value is null

        Parameters:
        actual - value to compare
        expected - value to compare
        format - date format to be use
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - interval between retries in milliseconds
        Returns:
        return actual value or null if the timeout reached
      • waitNotEqualsDatePortion

        public static boolean waitNotEqualsDatePortion​(java.util.Date actual,
                                                       java.util.Date expected,
                                                       int waitInSeconds,
                                                       int intervalInMilliSeconds)
        Wait for defined number of seconds till actual and expected have different string value after they converted using "yyyy-MM-dd" for format. Means that verification of "2019-08-09 12:20" and "2019-08-08 12:20" passes (means values are different)

        Please note that verification consider as passe if one of value is null

        Parameters:
        actual - value to compare
        expected - value to compare
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - interval between retries in milliseconds
        Returns:
        return actual value or null if the timeout reached
      • waitNotEqualsTimePortion

        public static boolean waitNotEqualsTimePortion​(java.util.Date actual,
                                                       java.util.Date expected,
                                                       int waitInSeconds,
                                                       int intervalInMilliSeconds)
        Wait for defined number of seconds till actual and expected have different string value after they converted using "HH:mm:ss" for format. Means that verification of "2019-08-09 12:20:31" and "2019-08-09 12:20:30" passes (means values are different)

        Please note that verification consider as passe if one of value is null

        Parameters:
        actual - value to compare
        expected - value to compare
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - interval between retries in milliseconds
        Returns:
        return actual value or null if the timeout reached