public abstract class IsSameOrAfter extends Object
| Constructor and Description |
|---|
IsSameOrAfter() |
| Modifier and Type | Method and Description |
|---|---|
static org.hamcrest.Matcher<Date> |
sameOrAfter(Date date)
Creates a matcher that matches when the examined date is at the same instant or after the reference date
For example:
|
static org.hamcrest.Matcher<Date> |
sameOrAfter(DayMonthYear date)
Creates a matcher that matches when the examined date is at the same instant or after the reference date
For example:
|
static org.hamcrest.Matcher<Date> |
sameOrAfter(int year,
Months month,
int day)
Creates a matcher that matches when the examined date is on the same day or after the start of the reference date
For example:
|
static org.hamcrest.Matcher<Date> |
sameOrAfter(int year,
Months month,
int date,
int hour,
int minute,
int second)
Creates a matcher that matches when the examined date is on the same second or after the start of the reference date and time
For example:
|
public static org.hamcrest.Matcher<Date> sameOrAfter(Date date)
assertThat(myDate, isSameOrAfter(new Date()))
date - the reference date against which the examined date is checkedpublic static org.hamcrest.Matcher<Date> sameOrAfter(DayMonthYear date)
assertThat(myDate, isSameOrAfter(Moments.today()))
date - the reference date against which the examined date is checkedpublic static org.hamcrest.Matcher<Date> sameOrAfter(int year, Months month, int day)
assertThat(myDate, isSameOrAfter(2012, Months.MAY, 12));
year - the year against which the examined date is checkedmonth - the month against which the examined date is checkedday - the day of the month against which the examined date is checkedpublic static org.hamcrest.Matcher<Date> sameOrAfter(int year, Months month, int date, int hour, int minute, int second)
assertThat(myDate, isSameOrAfter(2012, Months.MAY, 12, 23, 00, 01));
year - the year against which the examined date is checkedmonth - the month against which the examined date is checkedday - the day of the month against which the examined date is checkedhour - the hour of the day against which the examined date is checkedminute - the minute of the hour against which the examined date is checkedsecond - the second of the minute against which the examined date is checkedCopyright © 2014. All Rights Reserved.