static DateAssert |
Assertions.assertThat(java.util.Date actual) |
|
DateAssert |
DateAssert.hasTime(long timestamp) |
Verifies that the actual Date has the same time as the given timestamp.
|
DateAssert |
DateAssert.isAfter(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isAfter(java.util.Date other) |
Verifies that the actual Date is strictly after the given one.
|
DateAssert |
DateAssert.isAfterOrEqualsTo(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isAfterOrEqualsTo(java.util.Date other) |
Verifies that the actual Date is after or equals to the given one.
|
DateAssert |
DateAssert.isAfterYear(int year) |
Verifies that the actual Date is strictly after the given year.
|
DateAssert |
DateAssert.isBefore(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isBefore(java.util.Date other) |
Verifies that the actual Date is strictly before the given one.
|
DateAssert |
DateAssert.isBeforeOrEqualsTo(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isBeforeOrEqualsTo(java.util.Date other) |
Verifies that the actual Date is before or equals to the given one.
|
DateAssert |
DateAssert.isBeforeYear(int year) |
Verifies that the actual Date is strictly before the given year.
|
DateAssert |
DateAssert.isBetween(java.lang.String start,
java.lang.String end) |
|
DateAssert |
DateAssert.isBetween(java.lang.String start,
java.lang.String end,
boolean inclusiveStart,
boolean inclusiveEnd) |
|
DateAssert |
DateAssert.isBetween(java.util.Date start,
java.util.Date end) |
Verifies that the actual Date is in [start, end[ period (start included, end excluded).
|
DateAssert |
DateAssert.isBetween(java.util.Date start,
java.util.Date end,
boolean inclusiveStart,
boolean inclusiveEnd) |
Verifies that the actual Date is in the given period defined by start and end dates.
To include start in the period set inclusiveStart parameter to true .
To include end in the period set inclusiveEnd parameter to true .
|
DateAssert |
DateAssert.isCloseTo(java.lang.String dateAsString,
long deltaInMilliseconds) |
|
DateAssert |
DateAssert.isCloseTo(java.util.Date other,
long deltaInMilliseconds) |
Verifies that the actual Date is close to the other date by less than delta (expressed in milliseconds), if
difference is equals to delta it's ok.
|
DateAssert |
DateAssert.isEqualTo(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isIn(java.lang.String... datesAsString) |
|
DateAssert |
DateAssert.isInSameDayAs(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isInSameDayAs(java.util.Date other) |
Verifies that actual and given Date are chronologically in the same day of month (and thus in the same month and
year).
|
DateAssert |
DateAssert.isInSameHourAs(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isInSameHourAs(java.util.Date other) |
Verifies that actual and given Date are chronologically in the same hour (and thus in the same day, month and year).
|
DateAssert |
DateAssert.isInSameMinuteAs(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isInSameMinuteAs(java.util.Date other) |
Verifies that actual and given Date are chronologically in the same minute (and thus in the same hour, day, month and
year).
|
DateAssert |
DateAssert.isInSameMonthAs(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isInSameMonthAs(java.util.Date other) |
Verifies that actual and given Date are chronologically in the same month (and thus in the same year).
|
DateAssert |
DateAssert.isInSameSecondAs(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isInSameSecondAs(java.util.Date other) |
Verifies that actual and given Date are chronologically in the same second (and thus in the same minute, hour, day,
month and year).
|
DateAssert |
DateAssert.isInSameYearAs(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isInSameYearAs(java.util.Date other) |
Verifies that actual and given Date are in the same year.
|
DateAssert |
DateAssert.isInTheFuture() |
Verifies that the actual Date is strictly in the future.
|
DateAssert |
DateAssert.isInThePast() |
Verifies that the actual Date is strictly in the past.
|
DateAssert |
DateAssert.isInWithStringDateCollection(java.util.Collection<java.lang.String> datesAsString) |
Same assertion as Assert.isIn(Iterable) but given Dates are represented as String either with ISO date format
(yyyy-MM-dd) or user custom date format (set with method withDateFormat(DateFormat) ).
Method signature could not be isIn(Collection<String>) because it would be same signature as
isIn(Collection<Date>) since java collection type are erased at runtime.
|
DateAssert |
DateAssert.isNotBetween(java.lang.String start,
java.lang.String end) |
|
DateAssert |
DateAssert.isNotBetween(java.lang.String start,
java.lang.String end,
boolean inclusiveStart,
boolean inclusiveEnd) |
|
DateAssert |
DateAssert.isNotBetween(java.util.Date start,
java.util.Date end) |
Verifies that the actual Date is not in [start, end[ period
|
DateAssert |
DateAssert.isNotBetween(java.util.Date start,
java.util.Date end,
boolean inclusiveStart,
boolean inclusiveEnd) |
Verifies that the actual Date is not in the given period defined by start and end dates.
To include start in the period set inclusiveStart parameter to true .
To include end in the period set inclusiveEnd parameter to true .
|
DateAssert |
DateAssert.isNotEqualTo(java.lang.String dateAsString) |
|
DateAssert |
DateAssert.isNotIn(java.lang.String... datesAsString) |
|
DateAssert |
DateAssert.isNotInWithStringDateCollection(java.util.Collection<java.lang.String> datesAsString) |
Same assertion as Assert.isNotIn(Iterable) but given Dates are represented as String either with ISO date format
(yyyy-MM-dd) or user custom date format (set with method withDateFormat(DateFormat) ).
Method signature could not be isNotIn(Collection<String>) because it would be same signature as
isNotIn(Collection<Date>) since java collection type are erased at runtime.
|
DateAssert |
DateAssert.isToday() |
Verifies that the actual Date is today, that is matching current year, month and day (no check on hour, minute,
second, milliseconds).
|
DateAssert |
DateAssert.isWithinDayOfMonth(int dayOfMonth) |
Verifies that the actual Date day of month is equal to the given day of month.
|
DateAssert |
DateAssert.isWithinDayOfWeek(int dayOfWeek) |
Verifies that the actual Date day of week is equal to the given day of week (see Calendar.DAY_OF_WEEK for
valid values).
|
DateAssert |
DateAssert.isWithinHourOfDay(int hourOfDay) |
Verifies that the actual Date hour od day is equal to the given hour of day (24-hour clock).
|
DateAssert |
DateAssert.isWithinMillisecond(int millisecond) |
Verifies that the actual Date millisecond is equal to the given millisecond.
|
DateAssert |
DateAssert.isWithinMinute(int minute) |
Verifies that the actual Date minute is equal to the given minute.
|
DateAssert |
DateAssert.isWithinMonth(int month) |
Verifies that the actual Date month is equal to the given month, month value starting at 1 (January=1,
February=2, ...).
|
DateAssert |
DateAssert.isWithinSecond(int second) |
Verifies that the actual Date second is equal to the given second.
|
DateAssert |
DateAssert.isWithinYear(int year) |
Verifies that the actual Date year is equal to the given year.
|
DateAssert |
DateAssert.usingComparator(java.util.Comparator<? super java.util.Date> customComparator) |
|
DateAssert |
DateAssert.usingDefaultComparator() |
|
DateAssert |
DateAssert.withDateFormat(java.text.DateFormat userCustomDateFormat) |
For String based Date assertions like isBefore(String) , given String is expected to follow the default Date format,
that is ISO 8601 format : "yyyy-MM-dd".
|
DateAssert |
DateAssert.withIsoDateFormat() |
Use ISO 8601 date format ("yyyy-MM-dd") for String based Date assertions.
|