Class CDateWait
- java.lang.Object
-
- org.catools.common.extensions.wait.CObjectWait
-
- org.catools.common.extensions.wait.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 valuestatic 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 nullstatic 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 org.catools.common.extensions.wait.CObjectWait
waitEquals, waitIsNotNull, waitIsNull, waitNotEquals
-
-
-
-
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 valuePlease note that verification consider as passe if both value is null
- Parameters:
actual
- value to compareexpected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- 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 compareexpected
- value to compareformat
- date format to be usewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- 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" passesPlease note that verification consider as passe if both value is null
- Parameters:
actual
- value to compareexpected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- 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" passesPlease note that verification consider as passe if both value is null
- Parameters:
actual
- value to compareexpected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- 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 nullPlease note that verification consider as passe if one of value is null
- Parameters:
actual
- value to compareexpected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- 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 compareexpected
- value to compareformat
- date format to be usewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- 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 compareexpected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- 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 compareexpected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- return actual value or null if the timeout reached
-
-