public class DateTimeArrayArgs extends Object
DateTime[] arguments.
See ObjectArgs for an overview.
| Modifier and Type | Method and Description |
|---|---|
static DateTime[] |
checkExactValue(DateTime[] arr,
DateTime exactValue,
String arrArgName)
Tests if all values in an array have an exact value.
|
static DateTime[] |
checkMaxValue(DateTime[] arr,
DateTime maxValue,
String arrArgName)
Tests if all values in an array have a maximum value.
|
static DateTime[] |
checkMinValue(DateTime[] arr,
DateTime minValue,
String arrArgName)
Tests if all values in an array have a minimum value.
|
static DateTime[] |
checkNotExactValue(DateTime[] arr,
DateTime exactValue,
String arrArgName)
Tests if all values in an array do not have an exact value.
|
static DateTime[] |
checkValueInsideRange(DateTime[] arr,
DateTime minRangeValue,
DateTime maxRangeValue,
String arrArgName)
Tests if all values in an array are within specified range.
|
static DateTime[] |
checkValueOutsideRange(DateTime[] arr,
DateTime minRangeValue,
DateTime maxRangeValue,
String arrArgName)
Tests if all values in an array are not within specified range.
|
@FullyTested public static DateTime[] checkValueInsideRange(DateTime[] arr, DateTime minRangeValue, DateTime maxRangeValue, String arrArgName)
Example: All values must be >= 3 and <= 7:
checkValueInsideRange(numbersArray, 3, 7, "numbersArray");
arr - array of values to test. May be emptyminRangeValue - minimum value (inclusive) for inclusive range of each value in array to testmaxRangeValue - maximum value (inclusive) for inclusive range of each value in array to testarrArgName - argument name for arr, e.g., "valueList"NullPointerException - if arr is nullIllegalArgumentException - minValue > maxValuearr is outside allowed rangecheckValueInsideRange(DateTime[], DateTime, DateTime, String),
DateTimeIterableArgs.checkValueInsideRange(Iterable, DateTime, DateTime, String)@FullyTested public static DateTime[] checkValueOutsideRange(DateTime[] arr, DateTime minRangeValue, DateTime maxRangeValue, String arrArgName)
Example: All values must be <= 3 and >= 7:
checkValueInsideRange(numbersArray, 4, 6, "numbersArray");
arr - array of values to test. May be emptyminRangeValue - minimum value (inclusive) for exclusive range of each value in array to testmaxRangeValue - maximum value (inclusive) for exclusive range of each value in array to testarrArgName - argument name for arr, e.g., "valueList"NullPointerException - if arr is nullIllegalArgumentException - minValue > maxValuearr is inside not-allowed rangecheckValueOutsideRange(DateTime[], DateTime, DateTime, String),
DateTimeIterableArgs.checkValueOutsideRange(Iterable, DateTime, DateTime, String)@FullyTested public static DateTime[] checkMinValue(DateTime[] arr, DateTime minValue, String arrArgName)
arr - array of values to test. May be emptyminValue - minimum value (inclusive)arrArgName - argument name for arr, e.g., "valueList"NullPointerException - if arr is nullIllegalArgumentException - if any value of arr is less than minValuecheckMinValue(DateTime[], DateTime, String),
DateTimeIterableArgs.checkMinValue(Iterable, DateTime, String)@FullyTested public static DateTime[] checkMaxValue(DateTime[] arr, DateTime maxValue, String arrArgName)
arr - array of values to test. May be emptymaxValue - maximum value (inclusive)arrArgName - argument name for arr, e.g., "valueList"NullPointerException - if arr is nullIllegalArgumentException - if any value of arr is greater than maxValuecheckMaxValue(DateTime[], DateTime, String),
DateTimeIterableArgs.checkMaxValue(Iterable, DateTime, String)@FullyTested public static DateTime[] checkExactValue(DateTime[] arr, DateTime exactValue, String arrArgName)
arr - array of values to test. May be emptyexactValue - expected valuearrArgName - argument name for arr, e.g., "valueList"NullPointerException - if arr is nullIllegalArgumentException - if any value of arr is not exactValuecheckExactValue(DateTime[], DateTime, String),
DateTimeIterableArgs.checkExactValue(Iterable, DateTime, String)@FullyTested public static DateTime[] checkNotExactValue(DateTime[] arr, DateTime exactValue, String arrArgName)
arr - array of values to test. May be emptyexactValue - expected valuearrArgName - argument name for arr, e.g., "valueList"NullPointerException - if arr (or any element) is nullIllegalArgumentException - if any value of arr is exactValuecheckNotExactValue(DateTime[], DateTime, String),
DateTimeIterableArgs.checkNotExactValue(Iterable, DateTime, String)Copyright © 2013–2020. All rights reserved.